From a9892bbf6512544fbd8ca634700ab09dbad8f3f8 Mon Sep 17 00:00:00 2001 From: Chris Callanan Date: Tue, 5 Sep 2017 10:30:02 +1000 Subject: [PATCH] Added sysctl vm.max_map_count for elastic search and activated open-vm-tools --- Makefile | 2 +- application.go | 2 +- cloud-config.go | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5c80d8d..d7191b6 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION = 0.0.1-beta2 +VERSION = 0.0.1-beta3 VERSION_INFO_FILE = ./version-info.go BIN_DIRECTORY = _bin diff --git a/application.go b/application.go index 3199263..cf25e88 100644 --- a/application.go +++ b/application.go @@ -51,7 +51,7 @@ func (app *Application) Initialize() error { viper.BindEnv("MCP_VLAN_ID", "network.vlan_id") viper.SetConfigType("yaml") - + viper.SetConfigName("cloud-config-server") viper.AddConfigPath(".") viper.AddConfigPath("/etc") diff --git a/cloud-config.go b/cloud-config.go index 420930b..b7b271c 100644 --- a/cloud-config.go +++ b/cloud-config.go @@ -43,6 +43,9 @@ func (app *Application) GenerateInnerCloudConfig(server compute.Server) (cloudCo serializedCloudConfig, err = yaml.Marshal(gin.H{ "hostname": server.Name, "rancher": gin.H{ + "sysctl": gin.H{ + "vm.max_map_count": 262144, + }, "network": gin.H{ "interfaces": gin.H{ "eth*": gin.H{"dhcp": false}, @@ -62,6 +65,9 @@ func (app *Application) GenerateInnerCloudConfig(server compute.Server) (cloudCo }, }, }, + "services_include": gin.H{ + "open-vm-tools": true, + }, "services": gin.H{ "rancher-agent1": gin.H{ "image": app.RancherAgentVersion,