diff options
-rw-r--r-- | playbooks/aws/os2-atomic-proxy/vars.int.yml | 3 | ||||
-rw-r--r-- | playbooks/aws/os2-atomic-proxy/vars.prod.yml | 3 | ||||
-rw-r--r-- | playbooks/aws/os2-atomic-proxy/vars.stg.yml | 1 | ||||
-rw-r--r-- | roles/atomic_proxy/templates/puppet/puppet.conf.j2 | 2 | ||||
-rw-r--r-- | roles/docker_img_monitoring/tasks/main.yml | 4 | ||||
-rwxr-xr-x | roles/docker_img_monitoring/templates/monitoring_container/start.rb.j2 (renamed from roles/docker_img_monitoring/files/monitoring_container/start.rb) | 4 | ||||
-rw-r--r-- | roles/docker_img_puppet/files/puppet_container/Dockerfile | 3 |
7 files changed, 17 insertions, 3 deletions
diff --git a/playbooks/aws/os2-atomic-proxy/vars.int.yml b/playbooks/aws/os2-atomic-proxy/vars.int.yml new file mode 100644 index 000000000..00157cd89 --- /dev/null +++ b/playbooks/aws/os2-atomic-proxy/vars.int.yml @@ -0,0 +1,3 @@ +--- +oo_env_long: integration +oo_zabbix_hostgroups: ['INT Environment'] diff --git a/playbooks/aws/os2-atomic-proxy/vars.prod.yml b/playbooks/aws/os2-atomic-proxy/vars.prod.yml new file mode 100644 index 000000000..641afc626 --- /dev/null +++ b/playbooks/aws/os2-atomic-proxy/vars.prod.yml @@ -0,0 +1,3 @@ +--- +oo_env_long: production +oo_zabbix_hostgroups: ['PROD Environment'] diff --git a/playbooks/aws/os2-atomic-proxy/vars.stg.yml b/playbooks/aws/os2-atomic-proxy/vars.stg.yml index fa37b7ee3..8d994c2fc 100644 --- a/playbooks/aws/os2-atomic-proxy/vars.stg.yml +++ b/playbooks/aws/os2-atomic-proxy/vars.stg.yml @@ -1,2 +1,3 @@ --- oo_env_long: staging +oo_zabbix_hostgroups: ['STG Environment'] diff --git a/roles/atomic_proxy/templates/puppet/puppet.conf.j2 b/roles/atomic_proxy/templates/puppet/puppet.conf.j2 index 9a47ab11c..9731ff168 100644 --- a/roles/atomic_proxy/templates/puppet/puppet.conf.j2 +++ b/roles/atomic_proxy/templates/puppet/puppet.conf.j2 @@ -1,6 +1,6 @@ [main] # we need to override the host name of the container - certname = ctr-proxy.stg.rhcloud.com + certname = ctr-proxy.{{ oo_env }}.rhcloud.com # The Puppet log directory. # The default value is '$vardir/log'. diff --git a/roles/docker_img_monitoring/tasks/main.yml b/roles/docker_img_monitoring/tasks/main.yml index ce8d5a0a9..dce918cb6 100644 --- a/roles/docker_img_monitoring/tasks/main.yml +++ b/roles/docker_img_monitoring/tasks/main.yml @@ -7,4 +7,8 @@ with_items: - { name: 'Dockerfile', mode: '644' } - { name: 'register-with-zabbix.rb', mode: '755' } + +- name: deploy monitoring image build templates + template: "src=monitoring_container/{{ item.name }}.j2 dest=/usr/local/etc/containers/monitoring_container/{{ item.name }} mode={{ item.mode }}" + with_items: - { name: 'start.rb', mode: '755' } diff --git a/roles/docker_img_monitoring/files/monitoring_container/start.rb b/roles/docker_img_monitoring/templates/monitoring_container/start.rb.j2 index 7cd713707..70d60f87b 100755 --- a/roles/docker_img_monitoring/files/monitoring_container/start.rb +++ b/roles/docker_img_monitoring/templates/monitoring_container/start.rb.j2 @@ -5,9 +5,9 @@ require 'fileutils' # TODO: These should be passed in as env vars. When we're in a POD, make sure to do this. # WORKAROUND: ^^ -OO_ENV = 'stg' +OO_ENV = '{{ oo_env }}' OO_CTR_TYPE = 'proxy' -HOSTGROUPS = ['STG Environment'] +HOSTGROUPS = {{ oo_zabbix_hostgroups | to_nice_json }} TEMPLATES = ['Template OpenShift Proxy Ctr'] CTR_NAME = "ctr-#{OO_CTR_TYPE}-#{OO_ENV}-#{ENV['container_uuid'][0..6]}" diff --git a/roles/docker_img_puppet/files/puppet_container/Dockerfile b/roles/docker_img_puppet/files/puppet_container/Dockerfile index 0bc72d389..d5cdf1005 100644 --- a/roles/docker_img_puppet/files/puppet_container/Dockerfile +++ b/roles/docker_img_puppet/files/puppet_container/Dockerfile @@ -13,6 +13,9 @@ RUN yum -y install puppet3 crontabs cronie-anacron cronie system-config-firewall RUN rm /usr/sbin/lokkit ; ln -s /bin/true /usr/sbin/lokkit +# this is needed so that we can run puppet without running the start script +RUN mkdir -p /etc/haproxy + # END: These are to fake out puppet # Container specific files |