使用配置文件 (AEN 4.1.3)#

每个组件的配置文件的默认位置是:

  • Server—/opt/wakari/wakari-server/etc/wakari/config.json.
  • Gateway—/opt/wakari/wakari-gateway/etc/wakari/config.json.
  • Compute—/opt/wakari/wakari-compute/etc/wakari/config.json.

此外,特定服务的配置文件也可能存在于以下位置:

  • Server—/opt/wakari/wakari-server/etc/wakari/wk-server-config.json.
  • Gateway—/opt/wakari/wakari-gateway/etc/wakari/wk-gateway-config.json.
  • Compute—/opt/wakari/wakari-compute/etc/wakari/wk-compute-config.json.

每个服务按以下顺序加载每个配置文件,并在每一步更新AEN配置:

  1. /etc/wakari/config.json.
  2. /etc/wakari/wk-gateway-config.json.
  3. /opt/wakari/wakari-SERVICE/etc/wakari/config.json.
  4. /opt/wakari/wakari-SERVICE/etc/wakari/wk-SERVICE-config.json.
  5. ./config.json.
  6. ./wk-gateway-config.json.

AEN 配置键

以下是AEN支持的配置键列表:

Server Configuration Keys
Key Default Description
CDN $WAKARI_SERVER/static/ The location of static assets.
MONGO_DB wakari The name of the AEN database in mongodb.
MONGO_URL mongodb://localhost/ The URL of your AEN server’s mongodb instance.
WAKARI_SERVER   The URL of this AEN server.
DEFAULT_PRIVACY public The default project privacy setting—can be either public or private.
SESSION_COOKIE_NAME wakari. enterprise.session The Cookie name used to maintain Anaconda Enterprise Notebooks Enterprise login sessions.
USE_SES false Sets whether AEN will use Amazon SES to send emails.
SMTP   Sets the SMTP email settings.
- host   A SMTP subkey—the SMTP mail server hostname.
- user   SMTP subkey—the username for SMTP server authentication.
- password   SMTP subkey—the password for SMTP server authentication.
- from_addr   SMTP subkey—the From address for emails sent through SMTP.
verify_gateway _certificate true A boolean setting that indicates whether your AEN server should verify the gateway SSL certificate.
accounts wk_server.plugins .accounts.cloud The account provider class. For LDAP, this should be set to wk_server.plugins.accounts.ldap_accounts.
uniqueEmail true A boolean setting that indicate whether unique user email addresses are required.
has_internet true Boolean for retrieving the avatar from the gravatar URL. If false a local default is used instead.
LDAP 389 LDAP configurations.
- SERVER   LDAP subkey—A list of LDAP servers. At least one server name must be listed. The primary server should be listed first. All secondary or fail-over servers should be listed after the primary.
- PORT 389 LDAP subkey—The LDAP port on the LDAP server.
- AUTH_TYPE   LDAP subkey—LDAP Authentication types. simple—no encryption not secure.``TLS``–encrypted secure requires the TLS_CERT to be set.
- TLS_CERT   LDAP subkey—the full path to the TLS certificate file. The certificate file must also be provided by the Enterprise.
- BASEDN   LDAP subkey—the LDAP Base DN value.
- OU   LDAP subkey—a list of Organizational Units. Some Enterprises group users by OUs in their LDAP server records. AEN will loop over the list of OUs when authenticating a user. The OU value is a list of lists to support multiple OUs where each OU is a single name or a hierarchy of names.
- ANON_USER   LDAP subkey—the username—such as public or anonymous– assigned users who are not logged in to access projects. For more information, see 配置 sudo 自定义. Also used for MongoDB 配置.
SEARCH_ENABLED true Boolean indicating whether ElasticSearch is enabled
SEARCH_SERVER 'localhost:9200' IP address or domain name and port of ElasticSearch server
Gateway Configuration Keys
Key Default Description
WAKARI_SERVER   The URL of the AEN WAKARI_SERVER.
port 8089 The Port number used by the gateway application. Must be a non-privileged port (>= 1024).
client_id   The client ID assigned to this gateway by the server during wk-gateway-configure.
client_secret   The Client secret assigned to this gateway by the server during wk-gateway-configure.
httpTimeout 600 Timeout in seconds. The default is 10 minutes to allow project creation.
Compute Node Configuration Keys
Key Default Description
WAKARI_SERVER   The URL of the AEN WAKARI_SERVER.
MANAGE_ACCOUNTS true A boolean setting that indicates whether AEN should manage system user accounts. Set to false for LDAP installations.
port 2227 The port number used by the compute-launcher application. Note that individual applications use dynamic ports.
projectRoot /projects The location of project file storage.
appIdleTime 172800000 (48 hours) The amount of idle time before applications will be auto-terminated (in msec).
idleCheckInterval 3600000 (1 hour) The frequency of idle checks.
numericUsernames false A boolean setting that indicates whether numeric usernames are permitted.
httpTimeout 600 The time before a timeout—in seconds. The default is 10 minutes—600 seconds—to allow time for project creation.
- ANON_USER   Username such as public or anonymous for users who are not logged in to access projects. For more information, see, 配置 sudo 自定义. Also used for MongoDB 配置.
Server Internal Configuration Keys - Do not change
Key Default Description
PROVIDERS ["wk_server.plugins .providers.enterprise"] A list of compute provider classes.
LOGFILE /opt/wakari/wakari- server/var/log/wakari/ wakari-server. application.log The path to the server log file.
MONGO_ACTION _LOG_SIZE 262144000 The size of the Mongo action log in bytes.
SITE_ADMINS   A list of site administrator email addresses—used for crash notifications and LDAP password reset requests.
FROM _EMAIL_ADDR  
The From address for notification emails sent by AEN.
uniqueUserName true A boolean setting that indicates whether unique usernames are required.
Gateway Internal Configuration Keys - Do not change
Key Default Description
CDN $WAKARI_SERVER/static/ The location of static assets.
SUBDOMAIN_ROUTING false A boolean that indicates whether subdomains are being used.
Compute Node Internal Configuration Keys - Do not change
Key Default Description
CDN $WAKARI_SERVER/static/ The location of static assets.
USE_SES false Sets whether AEN will use Amazon SES to send emails.
multiUser true A boolean that indicates whether multi-user support is enabled.
multiProject true A boolean that indicates whether multi-project support is enabled.
ANACONDA_ROOT /opt/wakari/anaconda The location of your Anaconda installation.
logLevel debug Log verbosity–error, warn, info, or debug.
appLogs /opt/wakari/wakari- compute/var/log/wakari/ compute-launcher-apps The directory where application logs are stored.
appPIDs /opt/wakari/wakari-compute/ var/run/compute-launcher-apps The directory where application PID files are stored.
applicationLog /opt/wakari/wakari-compute/ var/log/wakari/ compute-launcher.application.log The path to the compute launcher log.
accessLog opt/wakari/wakari-compute/ var/log/wakari/ compute-launcher.access.log Path to compute launcher access log

检查配置文件语法

要验证配置文件包含有效的JSON,请运行:

root@server  # python -m json.tool /opt/wakari/wakari-server/etc/wakari/*.json
root@gateway # python -m json.tool /opt/wakari/wakari-gateway/etc/wakari/*.json
root@compute # python -m json.tool /opt/wakari/wakari-compute/etc/wakari/*.json

如果文件正确,内容将显示出来。

如果文件中存在语法错误,则会显示“无法解码JSON对象”的消息。

要修复任何错误,请编辑配置文件并确保其包含正确的JSON语法。