הפניה לקובץ תצורה של BaaS

Edge for Private Cloud גרסה 4.17.05

בהמשך מוצגת דוגמה לקובץ תצורה שקט להתקנה של API BaaS עם 10 צמתים. עורכים את הקובץ הזה לפי הצורך בהתאם להגדרות האישיות. כדי לכלול את הקובץ הזה, משתמשים באפשרות ‎-f ב-setup.sh.

# Specify IP address or DNS name of node.
IP1=192.168.1.1   # ElasticSearch
IP2=192.168.1.2   # ElasticSearch
IP3=192.168.1.3   # ElasticSearch
IP4=192.168.1.4   # API BaaS Stack
IP5=192.168.1.5   # API BaaS Stack
IP6=192.168.1.6   # API BaaS Stack
IP7=192.168.1.7   # API BaaS Portal
IP8=192.168.1.8   # Cassandra (shared with Edge or standalone)
IP9=192.168.1.9   # Cassandra (shared with Edge or standalone)
IP10=192.168.1.10  # Cassandra (shared with Edge or standalone)

# Must resolve to IP address or DNS name of host - not to 127.0.0.1 or localhost.
HOSTIP=$(hostname -i)

# Define the API BaaS administrator account.  
AS_ADMIN="superuser"    # User name - default is "superuser".
AS_ADMIN_EMAIL=stackAdmin@email.com
AS_PASSWD=stackAdminPWrod

# Only if you are installing Cassandra.
# Specify Cassandra data center and rack suffix.
# Must use IP addresses for CASS_HOSTS, not DNS names.
# CASS_HOSTS="$IP8:1,1 $IP9:1,1 $IP10:1,1"

# If connecting to existing Cassandra nodes, 
# specify Cassandra IPs.
# Must use IP addresses for CASS_HOSTS, not DNS names.
CASS_HOSTS="$IP8 $IP9 $IP10"

# Cassandra uname/pword.
# Even if Cassandra authentication is disabled,
# you must still pass values for these properties.
CASS_USERNAME=cassandra    # Default value
CASS_PASSWORD=cassandra    # Default value

# Specify BaaS Cassandra connection information.
# Specify the data center name.
BAAS_CASS_LOCALDC=dc-1    # Default is dc-1.

# For a single data center, specify the same value as BAAS_CASS_LOCALDC.
BAAS_CASS_DC_LIST="dc-1"

# Replication is in the form "dataCenterName:#CassandraNodes". 
# For example, for dc-1 with three Cassandra nodes, it is dc-1:3.
BAAS_CASS_REPLICATION=dc-1:3

# Defines the initial contact points for members of the BaaS cluster. 
# For a single node install, specify the IP address of the node. 
BAAS_CLUSTER_SEEDS="dc-1:$IP1"

# ElasticSearch IPs or DNS names, separated by spaces.
ES_HOSTS="$IP1 $IP2 $IP3"

# API BaaS Stack information.
# Default cluster name is "apigee_baas"
BAAS_USERGRID_CLUSTERNAME="apigee_baas" 

# URL and port of the load balancer for the API BaaS Stack nodes, 
# or IP/DNS and port 8080 of a single Stack node with no load balancer.
BAAS_USERGRID_URL=http://myloadbalancer:8443

# API BaaS Portal information.
# URL and port number of load balancer, if there is one in front of the Portal,
# or the URL and port of the Portal node.  
BAAS_PORTAL_URL="http://$IP7:9000"

# Portal port. Default value is 9000.
BAAS_PORTAL_LISTEN_PORT=9000 

# SMTP information. BaaS requires an SMTP server.
SMTPHOST=smtp.gmail.com
SMTPPORT=465
SMTPUSER=your@email.com
SMTPPASSWORD=yourEmailPassword
SMTPSSL=y

בטבלה הבאה מופיע מידע נוסף על המאפיינים האלה:

נכס

הערה

CASS_HOSTS

אם מתקינים את Cassandra, צריך לציין את כתובות ה-IP של צומת Cassandra (לא שמות DNS) ולכלול את המאפיין "‎:dc,ra" שמציין את מרכז הנתונים ואת המדף של צומת Cassandra.

לדוגמה, '192.168.124.201:1,1 = מרכז נתונים 1 וארון שרתים/אזור זמינות 1, ו-'192.168.124.204:2,1 = מרכז נתונים 2 וארון שרתים/אזור זמינות 1.

CASS_USERNAME
CASS_PASSWORD

שם המשתמש והסיסמה של Cassandra.

אם האימות של Cassandra מושבת, עדיין צריך להעביר את הערכים האלה. עם זאת, המערכת מתעלמת מהערכים.

BAAS_CASS_LOCALDC

שמות האזורים צריכים להיות בפורמט dc-# ‎, כאשר # מייצג ערך של מספר שלם.

לדוגמה, dc-1,‏ dc-2 וכו'. אם אתם מתחברים לאשכול Cassandra שמותקן עם Edge, אתם יכולים לבקש את הערך הזה ממנהל המערכת של Edge. בהתקנה של מרכז נתונים יחיד ב-Edge, ערך ברירת המחדל הוא dc-1.

אם התקנתם את Cassandra כחלק מההתקנה של API BaaS, אז במהלך ההתקנה של Cassandra הוספתם את המאפיין ":dc,ra" לכתובות ה-IP של Cassandra. הערך הראשון, "dc", הוא מספר מרכז הנתונים. שם מרכז הנתונים הוא המחרוזת "dc-‎" עם מספר מרכז הנתונים כסיומת.

BAAS_CASS_DC_LIST

מציינים את אותו ערך כמו BAAS_CASS_LOCALDC.

BAAS_CASS_REPLICATION

הפורמט הוא dataCenterName:#CassandraNodes בלי מירכאות. לדוגמה, עבור dc-1 עם שלושה צומתי Cassandra, הערך הוא dc-1:3.

כדי להתקין מרכז נתונים שני, צריך לציין מידע על שני מרכזי הנתונים:

BAAS_CASS_REPLICATION=dc-1:3,dc-2:3

BAAS_CLUSTER_SEEDS

מגדיר את נקודות הקשר הראשוניות של חברי אשכול ה-BaaS. ציינו רשימה מופרדת בפסיקים של צומתי ה-seed של BaaS Stack במרכז הנתונים, מוקפת במירכאות כפולות, בפורמט "dc-#:nodeIP", כאשר dc-# הוא השם של מרכז הנתונים כפי שהוגדר על ידי BAAS_CASS_LOCALDC.

בהתקנה של צומת יחיד, מציינים את כתובת ה-IP של הצומת.

בסביבת ייצור עם לפחות שלושה צומתי BaaS Stack במרכז הנתונים, צריך לציין שני צומתי Stack כ-seed. אל תציינו יותר משני צמתים, גם אם יש לכם שלושה צומתי Stack או יותר.

אם יש כמה מרכזי נתונים, צריך לציין רק את צומתי ה-seed במרכז הנתונים הזה.

BAAS_USERGRID_URL

בסביבת ייצור, זו כתובת ה-URL והיציאה של מאזן העומסים שנמצא לפני הצמתים של API BaaS Stack, בפורמט:

http://myStackLoadBalancer:8443

בסביבת בדיקה או פיתוח, שבה יש רק צומת אחד של API BaaS Stack, אפשר להשתמש בכתובת ה-URL ובמספר היציאה של צומת API BaaS Stack, בפורמט הבא:

http://stackIPorDNS:8080

מספר היציאה של שרת API BaaS Stack הוא 8080.

BAAS_PORTAL_URL

כתובת ה-URL ומספר היציאה של מאזן העומסים, אם יש כזה לפני הפורטל, בפורמט:

http://myPortalLoadBalancer:8443

אם אין מאזן עומסים, כתובת ה-URL ומספר היציאה של צומת הפורטל, בפורמט:

http://portalIPorDNS:9000

כברירת מחדל, מספר היציאה של פורטל API BaaS הוא 9000.

BAAS_PORTAL_LISTEN_PORT

מספר היציאה של שרת API BaaS Portal הוא 9000. אם היציאה הזו לא זמינה, צריך לציין יציאה אחרת.

אם מגדירים את BAAS_PORTAL_URL לכתובת ה-URL של צומת הפורטל, מספרי היציאות צריכים להיות זהים בשני המאפיינים.