Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CassandraConfig = template.Must(template.New("").Parse(`cluster_name: {{ .ClusterName }}
num_tokens: 32
hinted_handoff_enabled: true
max_hint_window_in_ms: 10800000 # 3 hours
hinted_handoff_throttle_in_kb: 1024
max_hints_delivery_threads: 2
hints_directory: /var/lib/cassandra/hints
hints_flush_period_in_ms: 10000
max_hints_file_size_in_mb: 128
batchlog_replay_throttle_in_kb: 1024
authenticator: AllowAllAuthenticator
authorizer: AllowAllAuthorizer
role_manager: CassandraRoleManager
roles_validity_in_ms: 2000
permissions_validity_in_ms: 2000
credentials_validity_in_ms: 2000
partitioner: org.apache.cassandra.dht.Murmur3Partitioner
data_file_directories:
- /var/lib/cassandra/data
commitlog_directory: /var/lib/cassandra/commitlog
disk_failure_policy: stop
commit_failure_policy: stop
key_cache_size_in_mb:
key_cache_save_period: 14400
row_cache_size_in_mb: 0
row_cache_save_period: 0
counter_cache_size_in_mb:
counter_cache_save_period: 7200
saved_caches_directory: /var/lib/cassandra/saved_caches
commitlog_sync: periodic
commitlog_sync_period_in_ms: 10000
commitlog_segment_size_in_mb: 32
seed_provider:
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
- seeds: {{ .Seeds }}
concurrent_reads: 32
concurrent_writes: 32
concurrent_counter_writes: 32
concurrent_materialized_view_writes: 32
disk_optimization_strategy: ssd
memtable_allocation_type: heap_buffers
index_summary_capacity_in_mb:
index_summary_resize_interval_in_minutes: 60
trickle_fsync: false
trickle_fsync_interval_in_kb: 10240
storage_port: {{ .StoragePort}}
ssl_storage_port: {{ .SslStoragePort }}
listen_address: {{ .ListenAddress }}
broadcast_address: {{ .BroadcastAddress }}
start_native_transport: true
native_transport_port: {{ .CQLPort }}
start_rpc: {{ .StartRPC }}
rpc_address: {{ .RPCAddress }}
rpc_port: {{ .RPCPort }}
broadcast_rpc_address: {{ .RPCBroadcastAddress}}
rpc_keepalive: true
rpc_server_type: sync
thrift_framed_transport_size_in_mb: 15
incremental_backups: false
snapshot_before_compaction: false
auto_snapshot: true
tombstone_warn_threshold: 1000
tombstone_failure_threshold: 100000
column_index_size_in_kb: 64
batch_size_warn_threshold_in_kb: 5
batch_size_fail_threshold_in_kb: 50
compaction_throughput_mb_per_sec: 16
compaction_large_partition_warning_threshold_mb: 100
sstable_preemptive_open_interval_in_mb: 50
read_request_timeout_in_ms: 5000
range_request_timeout_in_ms: 10000
write_request_timeout_in_ms: 2000
counter_write_request_timeout_in_ms: 5000
cas_contention_timeout_in_ms: 1000
truncate_request_timeout_in_ms: 60000
request_timeout_in_ms: 10000
cross_node_timeout: false
endpoint_snitch: SimpleSnitch
dynamic_snitch_update_interval_in_ms: 100
dynamic_snitch_reset_interval_in_ms: 600000
dynamic_snitch_badness_threshold: 0.1
request_scheduler: org.apache.cassandra.scheduler.NoScheduler
server_encryption_options:
internode_encryption: all
keystore: /etc/keystore/server-keystore.jks
keystore_password: {{ .KeystorePassword }}
truststore: /etc/keystore/server-truststore.jks
truststore_password: {{ .TruststorePassword }}
require_client_auth: true
store_type: JKS
client_encryption_options:
enabled: true
optional: false
keystore: /etc/keystore/server-keystore.jks
keystore_password: {{ .KeystorePassword }}
internode_compression: all
inter_dc_tcp_nodelay: false
tracetype_query_ttl: 86400
tracetype_repair_ttl: 604800
gc_warn_threshold_in_ms: 1000
enable_user_defined_functions: false
enable_scripted_user_defined_functions: false
windows_timer_interval: 1
transparent_data_encryption_options:
enabled: false
chunk_length_kb: 64
cipher: AES/CBC/PKCS5Padding
key_alias: testing:1
key_provider:
- class_name: org.apache.cassandra.security.JKSKeyProvider
parameters:
- keystore: conf/.keystore
keystore_password: cassandra
store_type: JCEKS
key_password: cassandra
auto_bootstrap: true
`))
CassandraConfig is the template of a full Cassandra configuration.
var ConfigAPIConfig = template.Must(template.New("").Parse(`[DEFAULTS]
listen_ip_addr=0.0.0.0
listen_port={{ .ListenPort }}
http_server_port=8084
http_server_ip=0.0.0.0
log_file=/var/log/contrail/contrail-api.log
log_level={{ .LogLevel }}
log_local=1
list_optimization_enabled=True
auth={{ .AuthMode }}
aaa_mode={{ .AAAMode }}
cloud_admin_role=admin
global_read_only_role=
config_api_ssl_enable=True
config_api_ssl_certfile=/etc/certificates/server-{{ .HostIP }}.crt
config_api_ssl_keyfile=/etc/certificates/server-key-{{ .HostIP }}.pem
config_api_ssl_ca_cert={{ .CAFilePath }}
cassandra_server_list={{ .CassandraServerList }}
cassandra_use_ssl=true
cassandra_ca_certs={{ .CAFilePath }}
zk_server_ip={{ .ZookeeperServerList }}
rabbit_server={{ .RabbitmqServerList }}
rabbit_vhost={{ .RabbitmqVhost }}
rabbit_user={{ .RabbitmqUser }}
rabbit_password={{ .RabbitmqPassword }}
rabbit_use_ssl=True
kombu_ssl_keyfile=/etc/certificates/server-key-{{ .HostIP }}.pem
kombu_ssl_certfile=/etc/certificates/server-{{ .HostIP }}.crt
kombu_ssl_ca_certs={{ .CAFilePath }}
kombu_ssl_version=tlsv1_2
rabbit_health_check_interval=10
collectors={{ .CollectorServerList }}
[SANDESH]
introspect_ssl_enable=True
introspect_ssl_insecure=False
sandesh_ssl_enable=True
sandesh_keyfile=/etc/certificates/server-key-{{ .HostIP }}.pem
sandesh_certfile=/etc/certificates/server-{{ .HostIP }}.crt
sandesh_ca_cert={{ .CAFilePath }}`))
ConfigAPIConfig is the template of the Config API service configuration.
var ConfigAPIServerConfig = template.Must(template.New("").Parse(`encryption:
ca: {{ .CAFilePath }}
cert: /etc/certificates/server-{{ .HostIP }}.crt
key: /etc/certificates/server-key-{{ .HostIP }}.pem
insecure: false
apiServerList:
{{range .APIServerList}}
- {{ . }}
{{ end }}
apiPort: {{ .ListenPort }}
`))
var ConfigAPIVNC = template.Must(template.New("").Parse(`[global]
WEB_SERVER = {{ .HostIP }}
WEB_PORT = {{ .ListenPort }} ; connection to api-server directly
BASE_URL = /
use_ssl = True
cafile = {{ .CAFilePath }}
; Authentication settings (optional)
[auth]
AUTHN_TYPE = {{ .AuthMode }}
AUTHN_PROTOCOL = https
AUTHN_SERVER = {{ .KeystoneIP }}
AUTHN_PORT = 5555
AUTHN_URL = /v3/auth/tokens
AUTHN_DOMAIN = Default
cafile = {{ .CAFilePath }}
;AUTHN_TOKEN_URL = http://127.0.0.1:35357/v2.0/tokens
`))
var ConfigAnalyticsapiConfig = template.Must(template.New("").Parse(`[DEFAULTS]
host_ip={{ .HostIP }}
http_server_port=8090
http_server_ip=0.0.0.0
rest_api_port=8081
rest_api_ip=0.0.0.0
aaa_mode={{ .AAAMode }}
log_file=/var/log/contrail/contrail-analytics-api.log
log_level=SYS_NOTICE
log_local=1
# Sandesh send rate limit can be used to throttle system logs transmitted per
# second. System logs are dropped if the sending rate is exceeded
#sandesh_send_rate_limit =
collectors={{ .CollectorServerList}}
api_server={{ .ApiServerList }}
api_server_use_ssl=True
zk_list={{ .ZookeeperServerList }}
analytics_api_ssl_enable = True
analytics_api_insecure_enable = True
analytics_api_ssl_certfile = /etc/certificates/server-{{ .HostIP }}.crt
analytics_api_ssl_keyfile = /etc/certificates/server-key-{{ .HostIP }}.pem
analytics_api_ssl_ca_cert = {{ .CAFilePath }}
[REDIS]
redis_uve_list={{ .RedisServerList }}
redis_password=
[SANDESH]
introspect_ssl_enable=True
introspect_ssl_insecure=False
sandesh_ssl_enable=True
sandesh_keyfile=/etc/certificates/server-key-{{ .HostIP }}.pem
sandesh_certfile=/etc/certificates/server-{{ .HostIP }}.crt
sandesh_ca_cert={{ .CAFilePath }}`))
ConfigAnalyticsapiConfig is the template of the AnalyticsAPI service configuration.
var ConfigCollectorConfig = template.Must(template.New("").Parse(`[DEFAULT]
analytics_data_ttl=48
analytics_config_audit_ttl=2160
analytics_statistics_ttl=168
analytics_flow_ttl=2
partitions=30
hostip={{ .HostIP }}
hostname={{ .Hostname }}
http_server_port=8089
http_server_ip=0.0.0.0
syslog_port=514
sflow_port=6343
ipfix_port=4739
# log_category=
log_file=/var/log/contrail/contrail-collector.log
log_files_count=10
log_file_size=1048576
log_level={{ .LogLevel }}
log_local=1
# sandesh_send_rate_limit=
cassandra_server_list={{ .CassandraServerList }}
zookeeper_server_list={{ .ZookeeperServerList }}
[CASSANDRA]
cassandra_use_ssl=true
cassandra_ca_certs={{ .CAFilePath }}
[COLLECTOR]
port=8086
server=0.0.0.0
protobuf_port=3333
[STRUCTURED_SYSLOG_COLLECTOR]
# TCP & UDP port to listen on for receiving structured syslog messages
port=3514
# List of external syslog receivers to forward structured syslog messages in ip:port format separated by space
# tcp_forward_destination=10.213.17.53:514
[API_SERVER]
# List of api-servers in ip:port format separated by space
api_server_list={{ .ApiServerList }}
api_server_use_ssl=True
[REDIS]
port=6379
server=127.0.0.1
password=
[CONFIGDB]
config_db_server_list={{ .CassandraServerList }}
config_db_use_ssl=true
config_db_ca_certs={{ .CAFilePath }}
rabbitmq_server_list={{ .RabbitmqServerList }}
rabbitmq_vhost={{ .RabbitmqVhost }}
rabbitmq_user={{ .RabbitmqUser }}
rabbitmq_password={{ .RabbitmqPassword }}
rabbitmq_use_ssl=True
rabbitmq_ssl_keyfile=/etc/certificates/server-key-{{ .HostIP }}.pem
rabbitmq_ssl_certfile=/etc/certificates/server-{{ .HostIP }}.crt
rabbitmq_ssl_ca_certs={{ .CAFilePath }}
rabbitmq_ssl_version=tlsv1_2
[SANDESH]
introspect_ssl_enable=True
introspect_ssl_insecure=False
sandesh_ssl_enable=True
sandesh_keyfile=/etc/certificates/server-key-{{ .HostIP }}.pem
sandesh_certfile=/etc/certificates/server-{{ .HostIP }}.crt
sandesh_ca_cert={{ .CAFilePath }}`))
ConfigCollectorConfig is the template of the Collector service configuration.
var ConfigDNSMasqConfig = `` /* 159-byte string literal not displayed */
ConfigDNSMasqConfig is the template of the DNSMasq service configuration.
var ConfigDeviceManagerConfig = template.Must(template.New("").Parse(`[DEFAULTS]
host_ip={{ .FabricMgmtIP }}
http_server_ip=0.0.0.0
api_server_ip={{ .ApiServerList}}
api_server_port=8082
api_server_use_ssl=True
analytics_server_ip={{ .AnalyticsServerList}}
analytics_server_port=8081
push_mode=1
log_file=/var/log/contrail/contrail-device-manager.log
log_level={{ .LogLevel }}
log_local=1
cassandra_server_list={{ .CassandraServerList }}
cassandra_use_ssl=true
cassandra_ca_certs={{ .CAFilePath }}
zk_server_ip={{ .ZookeeperServerList }}
# configure directories for job manager
# the same directories must be mounted to dnsmasq and DM container
dnsmasq_conf_dir=/var/lib/dnsmasq
tftp_dir=/var/lib/tftp
dhcp_leases_file=/var/lib/dnsmasq/dnsmasq.leases
dnsmasq_reload_by_signal=True
rabbit_server={{ .RabbitmqServerList }}
rabbit_vhost={{ .RabbitmqVhost }}
rabbit_user={{ .RabbitmqUser }}
rabbit_password={{ .RabbitmqPassword }}
rabbit_use_ssl=True
kombu_ssl_keyfile=/etc/certificates/server-key-{{ .HostIP }}.pem
kombu_ssl_certfile=/etc/certificates/server-{{ .HostIP }}.crt
kombu_ssl_ca_certs={{ .CAFilePath }}
kombu_ssl_version=tlsv1_2
rabbit_health_check_interval=10
collectors={{ .CollectorServerList }}
dm_run_mode={{ .DMRunMode }}
[SANDESH]
introspect_ssl_enable=True
introspect_ssl_insecure=False
sandesh_ssl_enable=True
sandesh_keyfile=/etc/certificates/server-key-{{ .HostIP }}.pem
sandesh_certfile=/etc/certificates/server-{{ .HostIP }}.crt
sandesh_ca_cert={{ .CAFilePath }}`))
ConfigDeviceManagerConfig is the template of the DeviceManager service configuration.
var ConfigKeystoneAuthConf = template.Must(template.New("").Parse(`[KEYSTONE]
#memcache_servers=localhost:11211
admin_password = {{ .AdminPassword }}
admin_tenant_name = {{ .AdminUsername }}
admin_user = {{ .AdminUsername }}
auth_host = {{ .KeystoneIP }}
auth_port = 5555
auth_protocol = https
auth_url = https://{{ .KeystoneIP }}:{{ .KeystonePort }}/v3
auth_type = password
cafile = {{ .CAFilePath }}
user_domain_name = Default
project_domain_name = Default
region_name = RegionOne`))
ConfigKeystoneAuthConf is the template of the DeviceManager keystone auth configuration.
var ConfigNodeConfig = template.Must(template.New("").Parse(`{{range .APIServerList}}
- {{ . }}
{{ end }}
`))
var ConfigNodemanagerAnalyticsConfig = template.Must(template.New("").Parse(`[DEFAULTS]
http_server_ip=0.0.0.0
log_file=/var/log/contrail/contrail-config-nodemgr.log
log_level={{ .LogLevel }}
log_local=1
hostip={{ .HostIP }}
db_port={{ .CassandraPort }}
db_jmx_port={{ .CassandraJmxPort }}
db_use_ssl=true
[COLLECTOR]
server_list={{ .CollectorServerList }}
[SANDESH]
introspect_ssl_enable=True
sandesh_ssl_enable=True
sandesh_keyfile=/etc/certificates/server-key-{{ .HostIP }}.pem
sandesh_certfile=/etc/certificates/server-{{ .HostIP }}.crt
sandesh_ca_cert={{ .CAFilePath }}`))
ConfigNodemanagerAnalyticsConfig is the template of the Analytics Nodemanager service configuration.
var ConfigNodemanagerConfigConfig = template.Must(template.New("").Parse(`[DEFAULTS]
http_server_ip=0.0.0.0
log_file=/var/log/contrail/contrail-config-nodemgr.log
log_level={{ .LogLevel }}
log_local=1
hostip={{ .HostIP }}
db_port={{ .CassandraPort }}
db_jmx_port={{ .CassandraJmxPort }}
db_use_ssl=true
[COLLECTOR]
server_list={{ .CollectorServerList }}
[SANDESH]
introspect_ssl_enable=True
introspect_ssl_insecure=False
sandesh_ssl_enable=True
sandesh_keyfile=/etc/certificates/server-key-{{ .HostIP }}.pem
sandesh_certfile=/etc/certificates/server-{{ .HostIP }}.crt
sandesh_ca_cert={{ .CAFilePath }}`))
ConfigNodemanagerConfigConfig is the template of the Config Nodemanager service configuration.
var ConfigQueryEngineConfig = template.Must(template.New("").Parse(`[DEFAULT]
analytics_data_ttl=48
hostip={{ .HostIP }}
hostname={{ .Hostname }}
http_server_ip=0.0.0.0
http_server_port=8091
log_file=/var/log/contrail/contrail-query-engine.log
log_level=SYS_DEBUG
log_local=1
max_slice=100
max_tasks=16
start_time=0
# Sandesh send rate limit can be used to throttle system logs transmitted per
# second. System logs are dropped if the sending rate is exceeded
# sandesh_send_rate_limit=
cassandra_server_list={{ .CassandraServerList }}
collectors={{ .CollectorServerList }}
[CASSANDRA]
cassandra_use_ssl=true
cassandra_ca_certs={{ .CAFilePath }}
[REDIS]
server_list={{ .RedisServerList }}
password=
redis_ssl_enable=False
[SANDESH]
introspect_ssl_enable=True
sandesh_ssl_enable=True
sandesh_keyfile=/etc/certificates/server-key-{{ .HostIP }}.pem
sandesh_certfile=/etc/certificates/server-{{ .HostIP }}.crt
sandesh_ca_cert={{ .CAFilePath }}`))
ConfigQueryEngineConfig is the template of the Config Nodemanager service configuration.
var ConfigSchematransformerConfig = template.Must(template.New("").Parse(`[DEFAULTS]
host_ip={{ .HostIP }}
http_server_ip=0.0.0.0
api_server_ip={{ .ApiServerList}}
api_server_port=8082
api_server_use_ssl=True
log_file=/var/log/contrail/contrail-schema.log
log_level={{ .LogLevel }}
log_local=1
cassandra_server_list={{ .CassandraServerList }}
cassandra_use_ssl=true
cassandra_ca_certs={{ .CAFilePath }}
zk_server_ip={{ .ZookeeperServerList }}
rabbit_server={{ .RabbitmqServerList }}
rabbit_vhost={{ .RabbitmqVhost }}
rabbit_user={{ .RabbitmqUser }}
rabbit_password={{ .RabbitmqPassword }}
rabbit_use_ssl=True
kombu_ssl_keyfile=/etc/certificates/server-key-{{ .HostIP }}.pem
kombu_ssl_certfile=/etc/certificates/server-{{ .HostIP }}.crt
kombu_ssl_ca_certs={{ .CAFilePath }}
kombu_ssl_version=tlsv1_2
rabbit_health_check_interval=10
collectors={{ .CollectorServerList }}
[SANDESH]
introspect_ssl_enable=True
introspect_ssl_insecure=False
sandesh_ssl_enable=True
sandesh_keyfile=/etc/certificates/server-key-{{ .HostIP }}.pem
sandesh_certfile=/etc/certificates/server-{{ .HostIP }}.crt
sandesh_ca_cert={{ .CAFilePath }}
[SECURITY]
use_certs=True
ca_certs={{ .CAFilePath }}
certfile=/etc/certificates/server-{{ .HostIP }}.crt
keyfile=/etc/certificates/server-key-{{ .HostIP }}.pem`))
ConfigSchematransformerConfig is the template of the SchemaTransformer service configuration.
var ConfigServicemonitorConfig = template.Must(template.New("").Parse(`[DEFAULTS]
host_ip={{ .HostIP }}
http_server_ip=0.0.0.0
api_server_ip={{ .ApiServerList }}
api_server_port=8082
api_server_use_ssl=True
log_file=/var/log/contrail/contrail-svc-monitor.log
log_level={{ .LogLevel }}
log_local=1
cassandra_server_list={{ .CassandraServerList }}
cassandra_use_ssl=true
cassandra_ca_certs={{ .CAFilePath }}
zk_server_ip={{ .ZookeeperServerList }}
rabbit_server={{ .RabbitmqServerList }}
rabbit_vhost={{ .RabbitmqVhost }}
rabbit_user={{ .RabbitmqUser }}
rabbit_password={{ .RabbitmqPassword }}
rabbit_use_ssl=True
kombu_ssl_keyfile=/etc/certificates/server-key-{{ .HostIP }}.pem
kombu_ssl_certfile=/etc/certificates/server-{{ .HostIP }}.crt
kombu_ssl_ca_certs={{ .CAFilePath }}
kombu_ssl_version=tlsv1_2
rabbit_health_check_interval=10
collectors={{ .CollectorServerList }}
analytics_api_ssl_enable = True
analytics_api_insecure_enable = False
analytics_api_ssl_certfile = /etc/certificates/server-{{ .HostIP }}.crt
analytics_api_ssl_keyfile = /etc/certificates/server-key-{{ .HostIP }}.pem
analytics_api_ssl_ca_cert = {{ .CAFilePath }}
[SECURITY]
use_certs=True
keyfile=/etc/certificates/server-key-{{ .HostIP }}.pem
certfile=/etc/certificates/server-{{ .HostIP }}.crt
ca_certs={{ .CAFilePath }}
[SCHEDULER]
# Analytics server list used to get vrouter status and schedule service instance
analytics_server_list={{ .AnalyticsServerList }}
aaa_mode={{ .AAAMode }}
[SANDESH]
introspect_ssl_enable=True
introspect_ssl_insecure=False
sandesh_ssl_enable=True
sandesh_keyfile=/etc/certificates/server-key-{{ .HostIP }}.pem
sandesh_certfile=/etc/certificates/server-{{ .HostIP }}.crt
sandesh_ca_cert={{ .CAFilePath }}`))
ConfigServicemonitorConfig is the template of the ServiceMonitor service configuration.
var ContrailCNIConfig = template.Must(template.New("").Parse(`{
"cniVersion": "0.3.1",
"contrail" : {
"vrouter-ip" : "127.0.0.1",
"vrouter-port" : 9091,
"config-dir" : "/var/lib/contrail/ports/vm",
"poll-timeout" : 5,
"poll-retries" : 5,
"log-file" : "/var/log/contrail/cni/opencontrail.log",
"log-level" : "4",
"cnisocket-path": "/var/run/contrail/cni.socket"
},
"name": "contrail-k8s-cni",
"type": "contrail-k8s-cni"
}`))
var ControlControlConfig = template.Must(template.New("").Parse(`[DEFAULT]
# bgp_config_file=bgp_config.xml
bgp_port=179
collectors={{ .CollectorServerList }}
# gr_helper_bgp_disable=0
# gr_helper_xmpp_disable=0
hostip={{ .ListenAddress }}
hostname={{ .Hostname }}
http_server_ip=0.0.0.0
http_server_port=8083
log_file=/var/log/contrail/contrail-control.log
log_level=SYS_NOTICE
log_local=1
# log_files_count=10
# log_file_size=10485760 # 10MB
# log_category=
# log_disable=0
xmpp_server_port=5269
xmpp_auth_enable=True
xmpp_server_cert=/etc/certificates/server-{{ .ListenAddress }}.crt
xmpp_server_key=/etc/certificates/server-key-{{ .ListenAddress }}.pem
xmpp_ca_cert={{ .CAFilePath }}
# Sandesh send rate limit can be used to throttle system logs transmitted per
# second. System logs are dropped if the sending rate is exceeded
# sandesh_send_rate_limit=
[CONFIGDB]
config_db_server_list={{ .CassandraServerList }}
# config_db_username=
# config_db_password=
config_db_use_ssl=True
config_db_ca_certs={{ .CAFilePath }}
rabbitmq_server_list={{ .RabbitmqServerList }}
rabbitmq_vhost={{ .RabbitmqVhost }}
rabbitmq_user={{ .RabbitmqUser }}
rabbitmq_password={{ .RabbitmqPassword }}
rabbitmq_use_ssl=True
rabbitmq_ssl_keyfile=/etc/certificates/server-key-{{ .ListenAddress }}.pem
rabbitmq_ssl_certfile=/etc/certificates/server-{{ .ListenAddress }}.crt
rabbitmq_ssl_ca_certs={{ .CAFilePath }}
rabbitmq_ssl_version=tlsv1_2
[SANDESH]
introspect_ssl_enable=True
sandesh_ssl_enable=True
sandesh_keyfile=/etc/certificates/server-key-{{ .ListenAddress }}.pem
sandesh_certfile=/etc/certificates/server-{{ .ListenAddress }}.crt
sandesh_ca_cert={{ .CAFilePath }}`))
ControlControlConfig is the template of the Control service configuration.
var ControlDNSConfig = template.Must(template.New("").Parse(`[DEFAULT]
collectors={{ .CollectorServerList }}
named_config_file = /etc/mycontrail/named.{{ .ListenAddress }}
named_config_directory = /etc/contrail/dns
named_log_file = /var/log/contrail/contrail-named.log
rndc_config_file = contrail-rndc.conf
named_max_cache_size=32M # max-cache-size (bytes) per view, can be in K or M
named_max_retransmissions=12
named_retransmission_interval=1000 # msec
hostip={{ .ListenAddress }}
hostname={{ .Hostname }}
http_server_port=8092
http_server_ip=0.0.0.0
dns_server_port=53
log_file=/var/log/contrail/contrail-dns.log
log_level=SYS_NOTICE
log_local=1
# log_files_count=10
# log_file_size=10485760 # 10MB
# log_category=
# log_disable=0
xmpp_dns_auth_enable=True
xmpp_server_cert=/etc/certificates/server-{{ .ListenAddress }}.crt
xmpp_server_key=/etc/certificates/server-key-{{ .ListenAddress }}.pem
xmpp_ca_cert={{ .CAFilePath }}
# Sandesh send rate limit can be used to throttle system logs transmitted per
# second. System logs are dropped if the sending rate is exceeded
# sandesh_send_rate_limit=
[CONFIGDB]
config_db_server_list={{ .CassandraServerList }}
# config_db_username=
# config_db_password=
config_db_use_ssl=True
config_db_ca_certs={{ .CAFilePath }}
rabbitmq_server_list={{ .RabbitmqServerList }}
rabbitmq_vhost={{ .RabbitmqVhost }}
rabbitmq_user={{ .RabbitmqUser }}
rabbitmq_password={{ .RabbitmqPassword }}
rabbitmq_use_ssl=True
rabbitmq_ssl_keyfile=/etc/certificates/server-key-{{ .ListenAddress }}.pem
rabbitmq_ssl_certfile=/etc/certificates/server-{{ .ListenAddress }}.crt
rabbitmq_ssl_ca_certs={{ .CAFilePath }}
rabbitmq_ssl_version=tlsv1_2
[SANDESH]
introspect_ssl_enable=True
sandesh_ssl_enable=True
sandesh_keyfile=/etc/certificates/server-key-{{ .ListenAddress }}.pem
sandesh_certfile=/etc/certificates/server-{{ .ListenAddress }}.crt
sandesh_ca_cert={{ .CAFilePath }}`))
ControlDNSConfig is the template of the Dns service configuration.
var ControlDeProvisionConfig = template.Must(template.New("").Parse(`#!/usr/bin/python
from vnc_api import vnc_api
import socket
vncServerList = [{{ .APIServerList }}]
vnc_client = vnc_api.VncApi(
username = '{{ .User }}',
password = '{{ .Password }}',
tenant_name = '{{ .Tenant }}',
api_server_host= vncServerList[0],
api_server_port={{ .APIServerPort }})
vnc_client.bgp_router_delete(fq_name=['default-domain','default-project','ip-fabric','__default__', '{{ .Hostname }}' ])
`))
ControlDeProvisionConfig is the template of the Control de-provision script.
var ControlNamedConfig = template.Must(template.New("").Parse(`options {
directory "/etc/contrail/dns";
managed-keys-directory "/etc/contrail/dns";
empty-zones-enable no;
pid-file "/etc/contrail/dns/contrail-named.pid";
session-keyfile "/etc/contrail/dns/session.key";
listen-on port 53 { any; };
allow-query { any; };
allow-recursion { any; };
allow-query-cache { any; };
max-cache-size 32M;
};
key "rndc-key" {
algorithm hmac-md5;
secret "xvysmOR8lnUQRBcunkC6vg==";
};
controls {
inet 127.0.0.1 port 8094
allow { 127.0.0.1; } keys { "rndc-key"; };
};
logging {
channel debug_log {
file "/var/log/contrail/contrail-named.log" versions 3 size 5m;
severity debug;
print-time yes;
print-severity yes;
print-category yes;
};
category default {
debug_log;
};
category queries {
debug_log;
};
};`))
ControlNamedConfig is the template of the Named service configuration.
var ControlNodemanagerConfig = template.Must(template.New("").Parse(`[DEFAULTS]
http_server_ip=0.0.0.0
log_file=/var/log/contrail/contrail-control-nodemgr.log
log_level=SYS_NOTICE
log_local=1
hostip={{ .ListenAddress }}
db_port={{ .CassandraPort }}
db_jmx_port={{ .CassandraJmxPort }}
db_use_ssl=True
[COLLECTOR]
server_list={{ .CollectorServerList }}
[SANDESH]
introspect_ssl_enable=True
introspect_ssl_insecure=False
sandesh_ssl_enable=True
sandesh_keyfile=/etc/certificates/server-key-{{ .ListenAddress }}.pem
sandesh_certfile=/etc/certificates/server-{{ .ListenAddress }}.crt
sandesh_ca_cert={{ .CAFilePath }}`))
ControlNodemanagerConfig is the template of the Control Nodemanager service configuration.
var ControlProvisionConfig = template.Must(template.New("").Parse(`#!/bin/bash
sed "s/hostip=.*/hostip=${POD_IP}/g" /etc/mycontrail/nodemanager.${POD_IP} > /etc/contrail/contrail-control-nodemgr.conf
servers=$(echo {{ .APIServerList }} | tr ',' ' ')
for server in $servers ; do
python /opt/contrail/utils/provision_control.py --oper $1 \
--api_server_use_ssl true \
--host_ip {{ .ListenAddress }} \
--router_asn {{ .ASNNumber }} \
--bgp_server_port {{ .BGPPort }} \
--api_server_ip $server \
--api_server_port {{ .APIServerPort }} \
--host_name {{ .Hostname }}
if [[ $? -eq 0 ]]; then
break
fi
done
`))
ControlProvisionConfig is the template of the Control provision script.
var FabricAnsibleConf = template.Must(template.New("").Parse(`[DEFAULTS]
log_file = /var/log/contrail/contrail-fabric-ansible.log
log_level={{ .LogLevel }}
log_local=1
collectors={{ .CollectorServerList }}
[SANDESH]
introspect_ssl_enable=True
introspect_ssl_insecure=False
sandesh_ssl_enable=True
sandesh_keyfile=/etc/certificates/server-key-{{ .HostIP }}.pem
sandesh_certfile=/etc/certificates/server-{{ .HostIP }}.crt
sandesh_ca_cert={{ .CAFilePath }}`))
FabricAnsibleConf is the template of the DeviceManager configuration for fabric management.
var KubemanagerAPIVNC = template.Must(template.New("").Parse(`[global]
WEB_SERVER = {{ .ListenAddress }}
WEB_PORT = {{ .ListenPort }} ; connection to api-server directly
BASE_URL = /
use_ssl = True
cafile = {{ .CAFilePath }}
; Authentication settings (optional)
[auth]
AUTHN_TYPE = noauth
;AUTHN_TYPE = keystone
;AUTHN_PROTOCOL = http
;AUTHN_SERVER = 127.0.0.1
;AUTHN_PORT = 35357
;AUTHN_URL = /v2.0/tokens
;AUTHN_TOKEN_URL = http://127.0.0.1:35357/v2.0/tokens
`))
var KubemanagerConfig = template.Must(template.New("").Parse(`[DEFAULTS]
host_ip={{ .ListenAddress }}
orchestrator={{ .CloudOrchestrator }}
token={{ .Token }}
log_file=/var/log/contrail/contrail-kube-manager.log
log_level=SYS_DEBUG
log_local=1
nested_mode=0
http_server_ip=0.0.0.0
[KUBERNETES]
kubernetes_api_server={{ .KubernetesAPIServer }}
kubernetes_api_port={{ .KubernetesAPIPort }}
kubernetes_api_secure_port={{ .KubernetesAPISSLPort }}
cluster_name={{ .KubernetesClusterName }}
cluster_project={}
cluster_network={}
pod_subnets={{ .PodSubnet }}
ip_fabric_subnets={{ .IPFabricSubnet }}
service_subnets={{ .ServiceSubnet }}
ip_fabric_forwarding={{ .IPFabricForwarding }}
ip_fabric_snat={{ .IPFabricSnat }}
host_network_service={{ .HostNetworkService }}
[VNC]
public_fip_pool={}
vnc_endpoint_ip={{ .APIServerList }}
vnc_endpoint_port={{ .APIServerPort }}
rabbit_server={{ .RabbitmqServerList }}
rabbit_port={{ .RabbitmqServerPort }}
rabbit_vhost={{ .RabbitmqVhost }}
rabbit_user={{ .RabbitmqUser }}
rabbit_password={{ .RabbitmqPassword }}
rabbit_use_ssl=True
kombu_ssl_keyfile=/etc/certificates/server-key-{{ .ListenAddress }}.pem
kombu_ssl_certfile=/etc/certificates/server-{{ .ListenAddress }}.crt
kombu_ssl_ca_certs={{ .CAFilePath }}
kombu_ssl_version=tlsv1_2
rabbit_health_check_interval=10
cassandra_server_list={{ .CassandraServerList }}
cassandra_use_ssl=True
cassandra_ca_certs={{ .CAFilePath }}
collectors={{ .CollectorServerList }}
zk_server_ip={{ .ZookeeperServerList }}
[SANDESH]
introspect_ssl_enable=True
introspect_ssl_insecure=False
sandesh_ssl_enable=True
sandesh_keyfile=/etc/certificates/server-key-{{ .ListenAddress }}.pem
sandesh_certfile=/etc/certificates/server-{{ .ListenAddress }}.crt
sandesh_ca_cert={{ .CAFilePath }}`))
KubemanagerConfig is the template of the Kubemanager service configuration.
var RabbitmqConfig = template.Must(template.New("").Parse(`#!/bin/bash
echo $RABBITMQ_ERLANG_COOKIE > /var/lib/rabbitmq/.erlang.cookie
chmod 0600 /var/lib/rabbitmq/.erlang.cookie
export RABBITMQ_NODENAME=rabbit@${POD_IP}
if [[ $(grep $POD_IP /etc/rabbitmq/0) ]] ; then
rabbitmq-server
else
rabbitmqctl --node rabbit@$(cat /etc/rabbitmq/0) ping
while [[ $? -ne 0 ]]; do
rabbitmqctl --node rabbit@$(cat /etc/rabbitmq/0) ping
done
rabbitmq-server -detached
rabbitmqctl --node rabbit@$(cat /etc/rabbitmq/0) node_health_check
while [[ $? -ne 0 ]]; do
rabbitmqctl --node rabbit@$(cat /etc/rabbitmq/0) node_health_check
done
rabbitmqctl stop_app
sleep 2
rabbitmqctl join_cluster rabbit@$(cat /etc/rabbitmq/0)
rabbitmqctl shutdown
rabbitmq-server
fi
`))
RabbitmqConfig is the template of the Rabbitmq service configuration.
var RabbitmqDefinition = template.Must(template.New("").Parse(`{
"users": [
{
"name": "{{ .RabbitmqUser }}",
"password_hash": "{{ .RabbitmqPassword }}",
"tags": "administrator"
}
],
"vhosts": [
{
"name": "{{ .RabbitmqVhost }}"
}
],
"permissions": [
{
"user": "{{ .RabbitmqUser }}",
"vhost": "{{ .RabbitmqVhost }}",
"configure": ".*",
"write": ".*",
"read": ".*"
}
],
}
`))
RabbitmqDefinition is the template for Rabbitmq user/vhost configuration
var VRouterConfig = template.Must(template.New("").Parse(`[CONTROL-NODE]
servers={{ .ControlServerList }}
[DEFAULT]
http_server_ip=0.0.0.0
collectors={{ .CollectorServerList }}
log_file=/var/log/contrail/contrail-vrouter-agent.log
log_level=SYS_NOTICE
log_local=1
hostname={{ .Hostname }}
agent_name={{ .Hostname }}
xmpp_dns_auth_enable=True
xmpp_auth_enable=True
xmpp_server_cert=/etc/certificates/server-{{ .ListenAddress }}.crt
xmpp_server_key=/etc/certificates/server-key-{{ .ListenAddress }}.pem
xmpp_ca_cert={{ .CAFilePath }}
physical_interface_mac = {{ .PhysicalInterfaceMac }}
tsn_servers = []
[SANDESH]
introspect_ssl_enable=True
introspect_ssl_insecure=False
sandesh_ssl_enable=True
sandesh_keyfile=/etc/certificates/server-key-{{ .ListenAddress }}.pem
sandesh_certfile=/etc/certificates/server-{{ .ListenAddress }}.crt
sandesh_ca_cert={{ .CAFilePath }}
[NETWORKS]
control_network_ip={{ .ListenAddress }}
[DNS]
servers={{ .DNSServerList }}
[METADATA]
metadata_proxy_secret={{ .MetaDataSecret }}
[VIRTUAL-HOST-INTERFACE]
name=vhost0
ip={{ .ListenAddress }}/{{ .PrefixLength }}
physical_interface={{ .PhysicalInterface }}
compute_node_address={{ .ListenAddress }}
gateway={{ .Gateway }}
[SERVICE-INSTANCE]
netns_command=/usr/bin/opencontrail-vrouter-netns
docker_command=/usr/bin/opencontrail-vrouter-docker
[HYPERVISOR]
type = kvm
[FLOWS]
fabric_snat_hash_table_size = 4096
[SESSION]
slo_destination = collector
sample_destination = collector`))
VRouterConfig is the template of the Kubemanager service configuration.
var VrouterDeProvisionConfig = template.Must(template.New("").Parse(`#!/usr/bin/python
from vnc_api import vnc_api
import socket
vncServerList = [{{ .APIServerList }}]
vnc_client = vnc_api.VncApi(
username = '{{ .User }}',
password = '{{ .Password }}',
tenant_name = '{{ .Tenant }}',
api_server_host= vncServerList[0],
api_server_port={{ .APIServerPort }})
vnc_client.vrouter_delete(fq_name=['default-domain','default-project','ip-fabric','__default__', '{{ .Hostname }}' ])`))
VrouterDeProvisionConfig is the template of the Control de-provision script.
var VrouterNodemanagerConfig = template.Must(template.New("").Parse(`[DEFAULTS]
http_server_ip=0.0.0.0
log_file=/var/log/contrail/contrail-vrouter-nodemgr.log
log_level=SYS_NOTICE
log_local=1
hostip={{ .ListenAddress }}
db_port={{ .CassandraPort }}
db_jmx_port={{ .CassandraJmxPort }}
db_use_ssl=False
[COLLECTOR]
server_list={{ .CollectorServerList }}
[SANDESH]
introspect_ssl_enable=True
introspect_ssl_insecure=False
sandesh_ssl_enable=True
sandesh_keyfile=/etc/certificates/server-key-{{ .ListenAddress }}.pem
sandesh_certfile=/etc/certificates/server-{{ .ListenAddress }}.crt
sandesh_ca_cert={{ .CAFilePath }}`))
VrouterNodemanagerConfig is the template of the Vrouter Nodemanager service configuration
var VrouterProvisionConfig = template.Must(template.New("").Parse(`#!/bin/bash
sed "s/hostip=.*/hostip=${POD_IP}/g" /etc/mycontrail/nodemanager.${POD_IP} > /etc/contrail/contrail-vrouter-nodemgr.conf
servers=$(echo {{ .APIServerList }} | tr ',' ' ')
for i in {1..5}; do
for server in $servers ; do
python /opt/contrail/utils/provision_vrouter.py --oper $1 \
--host_ip {{ .ListenAddress }} \
--api_server_ip $server \
--api_server_port {{ .APIServerPort }} \
--host_name {{ .Hostname }}
if [[ $? -eq 0 ]]; then
break 2
fi
done
sleep 2
done`))
VrouterProvisionConfig is the template of the Vrouter provision script.
var WebuiAuthConfig = template.Must(template.New("").Parse(`/*
* Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
*/
var auth = {};
auth.admin_user = '{{ .AdminUsername }}';
auth.admin_password = '{{ .AdminPassword }}';
auth.admin_token = '';
auth.admin_tenant_name = '{{ .AdminUsername }}';
auth.project_domain_name = 'Default';
auth.user_domain_name = 'Default';
module.exports = auth;
`))
WebuiAuthConfig is the template of the Webui Auth service configuration.
var WebuiWebConfig = template.Must(template.New("").Parse(`/*
* Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
*/
var config = {};
config.orchestration = {};
config.orchestration.Manager = "{{ .Manager }}";
config.orchestrationModuleEndPointFromConfig = false;
config.contrailEndPointFromConfig = true;
config.regionsFromConfig = false;
config.endpoints = {};
config.endpoints.apiServiceType = "ApiServer";
config.endpoints.opServiceType = "OpServer";
config.regions = {};
config.regions.RegionOne = "https://{{ .KeystoneIP }}:{{ .KeystonePort }}/v3";
config.serviceEndPointTakePublicURL = true;
config.networkManager = {};
config.networkManager.ip = "127.0.0.1";
config.networkManager.port = "9696";
config.networkManager.authProtocol = "http";
config.networkManager.apiVersion = [];
config.networkManager.strictSSL = false;
config.networkManager.ca = "";
config.imageManager = {};
config.imageManager.ip = "127.0.0.1";
config.imageManager.port = "9292";
config.imageManager.authProtocol = "http";
config.imageManager.apiVersion = ['v1', 'v2'];
config.imageManager.strictSSL = false;
config.imageManager.ca = "";
config.computeManager = {};
config.computeManager.ip = "127.0.0.1";
config.computeManager.port = "8774";
config.computeManager.authProtocol = "http";
config.computeManager.apiVersion = ['v1.1', 'v2'];
config.computeManager.strictSSL = false;
config.computeManager.ca = "";
config.identityManager = {};
config.identityManager.ip = "{{ .KeystoneIP }}";
config.identityManager.port = "{{ .KeystonePort }}";
config.identityManager.authProtocol = "https";
config.identityManager.apiVersion = ['v3'];
config.identityManager.strictSSL = false;
config.identityManager.defaultDomain = "Default";
config.identityManager.ca = "{{ .CAFilePath }}";
config.storageManager = {};
config.storageManager.ip = "127.0.0.1";
config.storageManager.port = "8776";
config.storageManager.authProtocol = "http";
config.storageManager.apiVersion = ['v1'];
config.storageManager.strictSSL = false;
config.storageManager.ca = "";
config.cnfg = {};
config.cnfg.server_ip = [{{ .APIServerList }}];
config.cnfg.server_port = "{{ .APIServerPort }}";
config.cnfg.authProtocol = "https";
config.cnfg.strictSSL = false;
config.cnfg.ca = "{{ .CAFilePath }}";
config.cnfg.statusURL = '/global-system-configs';
config.analytics = {};
config.analytics.server_ip = [{{ .AnalyticsServerList }}];
config.analytics.server_port = "{{ .AnalyticsServerPort }}";
config.analytics.authProtocol = "https";
config.analytics.strictSSL = false;
config.analytics.ca = '{{ .CAFilePath }}';
config.analytics.statusURL = '/analytics/uves/bgp-peers';
config.dns = {};
config.dns.server_ip = [{{ .ControlNodeList }}];
config.dns.server_port = '{{ .DnsNodePort }}';
config.dns.statusURL = '/Snh_PageReq?x=AllEntries%20VdnsServersReq';
config.vcenter = {};
config.vcenter.server_ip = "127.0.0.1"; //vCenter IP
config.vcenter.server_port = "443"; //Port
config.vcenter.authProtocol = "https"; //http or https
config.vcenter.datacenter = "vcenter"; //datacenter name
config.vcenter.dvsswitch = "vswitch"; //dvsswitch name
config.vcenter.strictSSL = false; //Validate the certificate or ignore
config.vcenter.ca = ''; //specify the certificate key file
config.vcenter.wsdl = "/usr/src/contrail/contrail-web-core/webroot/js/vim.wsdl";
config.introspect = {};
config.introspect.ssl = {};
config.introspect.ssl.enabled = true;
config.introspect.ssl.key = '/etc/certificates/server-key-{{ .HostIP }}.pem';
config.introspect.ssl.cert = '/etc/certificates/server-{{ .HostIP }}.crt';
config.introspect.ssl.ca = '{{ .CAFilePath }}';
config.introspect.ssl.strictSSL = false;
config.jobServer = {};
config.jobServer.server_ip = '127.0.0.1';
config.jobServer.server_port = '3000';
config.files = {};
config.files.download_path = '/tmp';
config.cassandra = {};
config.cassandra.server_ips = [{{ .CassandraServerList }}];
config.cassandra.server_port = '{{ .CassandraPort }}';
config.cassandra.enable_edit = false;
config.cassandra.use_ssl = true;
config.cassandra.ca_certs = '{{ .CAFilePath }}';
config.kue = {};
config.kue.ui_port = '3002'
config.webui_addresses = {};
config.insecure_access = false;
config.http_port = '8180';
config.https_port = '8143';
config.require_auth = false;
config.node_worker_count = 1;
config.maxActiveJobs = 10;
config.redisDBIndex = 3;
config.CONTRAIL_SERVICE_RETRY_TIME = 300000; //5 minutes
config.redis_server_port = '{{ .RedisServerPort }}';
config.redis_server_ip = '{{ .RedisServerList }}';
config.redis_dump_file = '/var/lib/redis/dump-webui.rdb';
config.redis_password = '';
config.logo_file = '/opt/contrail/images/logo.png';
config.favicon_file = '/opt/contrail/images/favicon.ico';
config.featurePkg = {};
config.featurePkg.webController = {};
config.featurePkg.webController.path = '/usr/src/contrail/contrail-web-controller';
config.featurePkg.webController.enable = true;
config.qe = {};
config.qe.enable_stat_queries = false;
config.logs = {};
config.logs.level = 'debug';
config.getDomainProjectsFromApiServer = false;
config.network = {};
config.network.L2_enable = false;
config.getDomainsFromApiServer = false;
config.jsonSchemaPath = "/usr/src/contrail/contrail-web-core/src/serverroot/configJsonSchemas";
config.server_options = {};
config.server_options.key_file = '/etc/certificates/server-key-{{ .HostIP }}.pem';
config.server_options.cert_file = '/etc/certificates/server-{{ .HostIP }}.crt';
config.server_options.ciphers = 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:AES256-SHA';
module.exports = config;
config.staticAuth = [];
config.staticAuth[0] = {};
config.staticAuth[0].username = '{{ .AdminUsername }}';
config.staticAuth[0].password = '{{ .AdminPassword }}';
config.staticAuth[0].roles = ['cloudAdmin'];
`))
WebuiWebConfig is the template of the Webui Web service configuration.
var ZookeeperConfig = template.Must(template.New("").Parse(`clientPort={{ .ClientPort }}
clientPortAddress=
dataDir=/data
dataLogDir=/datalog
tickTime=2000
initLimit=5
syncLimit=2
maxClientCnxns=60
admin.enableServer=true
standaloneEnabled=false
4lw.commands.whitelist=stat,ruok,conf,isro
reconfigEnabled=true
dynamicConfigFile=/mydata/zoo.cfg.dynamic.100000000
`))
ZookeeperConfig is the template of the Zookeeper service configuration.
var ZookeeperLogConfig = template.Must(template.New("").Parse(`zookeeper.root.logger=INFO, CONSOLE
zookeeper.console.threshold=INFO
zookeeper.log.dir=.
zookeeper.log.file=zookeeper.log
zookeeper.log.threshold=INFO
zookeeper.log.maxfilesize=256MB
zookeeper.log.maxbackupindex=20
zookeeper.tracelog.dir=${zookeeper.log.dir}
zookeeper.tracelog.file=zookeeper_trace.log
log4j.rootLogger=${zookeeper.root.logger}
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=${zookeeper.console.threshold}
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n
log4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender
log4j.appender.ROLLINGFILE.Threshold=${zookeeper.log.threshold}
log4j.appender.ROLLINGFILE.File=${zookeeper.log.dir}/${zookeeper.log.file}
log4j.appender.ROLLINGFILE.MaxFileSize=${zookeeper.log.maxfilesize}
log4j.appender.ROLLINGFILE.MaxBackupIndex=${zookeeper.log.maxbackupindex}
log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n
log4j.appender.TRACEFILE=org.apache.log4j.FileAppender
log4j.appender.TRACEFILE.Threshold=TRACE
log4j.appender.TRACEFILE.File=${zookeeper.tracelog.dir}/${zookeeper.tracelog.file}
log4j.appender.TRACEFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.TRACEFILE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L][%x] - %m%n
`))
ZookeeperLogConfig is the template of the Zookeeper Log configuration.
var ZookeeperRunnerConfig = template.Must(template.New("").Parse(`#!/bin/bash
grep ${POD_IP} /mydata/zoo.cfg.dynamic.100000000 |sed -e 's/.*server.\(.*\)=.*/\1/' > /data/myid
sed -i "s/clientPortAddress=.*/clientPortAddress=${POD_IP}/g" /conf/zoo.cfg
cat /mydata/zoo.cfg.dynamic.100000000 | grep -v ${POD_IP} | sed -e 's/.*server.\(.*\)=.*/\1/' > /data/myid
zkServer.sh --config /conf start-foreground
`))
ZookeeperRunnerConfig is the script to start zookeeper service.
var ZookeeperXslConfig = template.Must(template.New("").Parse(`<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="configuration">
<html>
<body>
<table border="1">
<tr>
<td>name</td>
<td>value</td>
<td>description</td>
</tr>
<xsl:for-each select="property">
<tr>
<td><a name="{name}"><xsl:value-of select="name"/></a></td>
<td><xsl:value-of select="value"/></td>
<td><xsl:value-of select="description"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
`))
ZookeeperXslConfig is the template of the Zookeeper XSL configuration.
Functions ¶
This section is empty.
Types ¶
This section is empty.