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

Edge for Private Cloud v. 4.17.09

למטה מוצג קובץ תצורה שקטה לדוגמה עבור התקנת ממשק 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
SMTPMAILFROM="My Company <myco@company.com>"

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

נכס

הערה

CASS_HostS

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

לדוגמה, '192.168.124.201:1,1 = datacenter 1 ואזור 1/4 של המדפים/זמינות 1, ו-'192.168.124.204:2,1 = datacenter 2 ו-restore/availability region 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

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

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

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

למרכזי נתונים מרובים, מציינים רק את צומתי המקור במרכז הנתונים הזה.

BAAS_USERGRID_URL

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

http://myStackLoad Balancer:8443

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

http://stackIPorDNS:8080

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

BAAS_PORTAL_URL

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

http://myPortalLoad Balancer:8443

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

http://portalIPorDNS:9000

היא ה-API בשדה

BAAS_PORTAL_LISTEN_PORT

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

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

SMTPמארח
SMTPUSER
SMTPPASSWORD
SMTPSSL
SMTPPORT
SMTPMAILFROM

הגדרת SMTP כדי ש-API BaaS יוכל לשלוח אימיילים עבור סיסמאות אבודות והתראות אחרות.

אם לא נדרשים פרטי כניסה של משתמש SMTP, משמיטים את הפרמטרים SMTPUSER ו-SMTPPASSWORD.