Jelajahi Sumber

making atomic proxy be able to be deployed to PROD.

Thomas Wiest 10 tahun lalu
induk
melakukan
3f90353f49

+ 3 - 0
playbooks/aws/os2-atomic-proxy/vars.int.yml

@@ -0,0 +1,3 @@
+---
+oo_env_long: integration
+oo_zabbix_hostgroups: ['INT Environment']

+ 3 - 0
playbooks/aws/os2-atomic-proxy/vars.prod.yml

@@ -0,0 +1,3 @@
+---
+oo_env_long: production
+oo_zabbix_hostgroups: ['PROD Environment']

+ 1 - 0
playbooks/aws/os2-atomic-proxy/vars.stg.yml

@@ -1,2 +1,3 @@
 ---
 oo_env_long: staging
+oo_zabbix_hostgroups: ['STG Environment']

+ 1 - 1
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'.

+ 4 - 0
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' }

+ 2 - 2
roles/docker_img_monitoring/files/monitoring_container/start.rb

@@ -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]}"
 

+ 3 - 0
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