summaryrefslogtreecommitdiffstats
path: root/roles/docker_img_puppet
diff options
context:
space:
mode:
authorThomas Wiest <twiest@redhat.com>2014-12-15 16:00:47 -0500
committerThomas Wiest <twiest@redhat.com>2014-12-15 16:00:47 -0500
commit023f92f9e3eec7de6c1286549000be79189a4fde (patch)
tree0bb33e5ee852ea533f1f808a8e86e38c97699bb4 /roles/docker_img_puppet
parent2848232bdaed44fadb51548fe9d6c39fe89b8e11 (diff)
downloadopenshift-023f92f9e3eec7de6c1286549000be79189a4fde.tar.gz
openshift-023f92f9e3eec7de6c1286549000be79189a4fde.tar.bz2
openshift-023f92f9e3eec7de6c1286549000be79189a4fde.tar.xz
openshift-023f92f9e3eec7de6c1286549000be79189a4fde.zip
changed atomic proxy to use pre-built container images
Diffstat (limited to 'roles/docker_img_puppet')
-rw-r--r--roles/docker_img_puppet/README.md36
-rw-r--r--roles/docker_img_puppet/defaults/main.yml2
-rw-r--r--roles/docker_img_puppet/files/puppet_container/Dockerfile38
-rwxr-xr-xroles/docker_img_puppet/files/puppet_container/service.rb18
-rwxr-xr-xroles/docker_img_puppet/files/puppet_container/start.rb86
-rw-r--r--roles/docker_img_puppet/handlers/main.yml2
-rw-r--r--roles/docker_img_puppet/meta/main.yml14
-rw-r--r--roles/docker_img_puppet/tasks/main.yml10
-rw-r--r--roles/docker_img_puppet/vars/main.yml2
9 files changed, 0 insertions, 208 deletions
diff --git a/roles/docker_img_puppet/README.md b/roles/docker_img_puppet/README.md
deleted file mode 100644
index 57ff5b6b4..000000000
--- a/roles/docker_img_puppet/README.md
+++ /dev/null
@@ -1,36 +0,0 @@
-Role Name
-=========
-
-The purpose of this role is to setup files to do the puppet docker image build
-
-Requirements
-------------
-
-Docker
-
-Role Variables
---------------
-
-None
-
-Dependencies
-------------
-
-None
-
-Example Playbook
-----------------
-
- - hosts: servers
- roles:
- - docker_img_puppet
-
-License
--------
-
-ASL 2.0
-
-Author Information
-------------------
-
-Thomas Wiest
diff --git a/roles/docker_img_puppet/defaults/main.yml b/roles/docker_img_puppet/defaults/main.yml
deleted file mode 100644
index 1f563defd..000000000
--- a/roles/docker_img_puppet/defaults/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-# defaults file for docker_img_puppet
diff --git a/roles/docker_img_puppet/files/puppet_container/Dockerfile b/roles/docker_img_puppet/files/puppet_container/Dockerfile
deleted file mode 100644
index e16536c03..000000000
--- a/roles/docker_img_puppet/files/puppet_container/Dockerfile
+++ /dev/null
@@ -1,38 +0,0 @@
-# This FROM gives us the proper oo-rhui certs, basic runtime env vars, basic repos, etc.
-# Otherwise we can't install anything
-FROM rhel6ops
-
-MAINTAINER Thomas Wiest <twiest@redhat.com>
-
-RUN yum -y update ; yum clean all
-
-# Container Specific RPMs
-RUN yum -y install puppet3 crontabs cronie-anacron cronie system-config-firewall-base httpd mod_ssl ruby193-rubygem-zbxapi mod_security rhc-site-static; yum clean all
-
-# BEGIN: These are to fake out puppet
-
-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
-
-# Setup libra_ops group for compatibility with host puppet
-RUN groupadd libra_ops
-
-# END: These are to fake out puppet
-
-# Container specific files
-ADD start.rb /usr/local/sbin/start.rb
-ADD service.rb /sbin/service
-
-# Ensure the scripts are executable
-RUN chmod 755 /sbin/service /usr/local/sbin/start.rb
-
-RUN yum -y install strace ; yum clean all
-
-# Get rid of puppet deprecation warnings
-RUN sed -i 's/^.*manifest =.*$//' /etc/puppet/puppet.conf ; \
- sed -i 's/^.*manifestdir =.*$//' /etc/puppet/puppet.conf ; \
- sed -i 's/^.*modulepath =.*$//' /etc/puppet/puppet.conf
-
-CMD ["/usr/local/sbin/start.rb"]
diff --git a/roles/docker_img_puppet/files/puppet_container/service.rb b/roles/docker_img_puppet/files/puppet_container/service.rb
deleted file mode 100755
index 40779c270..000000000
--- a/roles/docker_img_puppet/files/puppet_container/service.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'fileutils'
-
-if __FILE__ == $0
- abort "\nUsage: #{File.basename($0)} <name> <action>\n\n" unless ARGV.size == 2
-
- name = ARGV[0]
- action = ARGV[1]
-
- SERVICE_IPC_DIR = '/var/run/ctr-ipc/service'
-
- FileUtils.mkdir_p(SERVICE_IPC_DIR)
-
- File.open("#{SERVICE_IPC_DIR}/#{name}", 'w') do |f|
- f.print action
- end
-end
diff --git a/roles/docker_img_puppet/files/puppet_container/start.rb b/roles/docker_img_puppet/files/puppet_container/start.rb
deleted file mode 100755
index f1dd940ba..000000000
--- a/roles/docker_img_puppet/files/puppet_container/start.rb
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'fileutils'
-
-CTR_CONFIG_FLAG = '/shared/var/run/ctr-ipc/flag/ctr_configured'
-
-
-class Start
- def self.setup_shared_dirs()
- puts '_'
- puts 'Setting up dirs in shared volume'
- puts '--------------------------------'
- mtab = File.read('/etc/mtab')
-
- shared_dirs = mtab.grep(/ \/shared\//).collect { |line| line.split(' ')[1] }
-
- shared_dirs.each do |sh_dir|
- orig_dir = sh_dir.gsub(/^\/shared/,'')
-
- next if File.symlink?(orig_dir)
-
- if File.exist?(orig_dir)
- cmd = "cp -vaf #{orig_dir} #{File.dirname(sh_dir)}"
- puts "Running: #{cmd}"
- system(cmd)
-
- cmd = "rm -vrf #{orig_dir}"
- puts "Running: #{cmd}"
- system(cmd)
- end
-
- FileUtils.ln_s(sh_dir, orig_dir, {:verbose => true})
- end
- puts 'Done.'
- puts '_'
- end
-
- def self.run_puppet_agent()
- puts '_'
- puts 'Running Puppet Agent'
- puts '--------------------'
- exitcode = nil
- 1.upto(3) do |ctr|
- unless ctr == 1
- puts '_'
- puts "Previous puppet run failed with exit code [#{exitcode}], running again..."
- puts '_'
- end
-
- system("bash -c 'time /usr/bin/puppet agent -t'")
- exitcode = $?.exitstatus
- puts "Exit Code [#{exitcode}]"
-
- break if exitcode == 0 || exitcode == 2
- end
-
- raise "Puppet run failed, retries exhausted." if exitcode != 0 && exitcode != 2
-
- puts 'Done.'
- puts '_'
-
- puts '_'
- puts 'Creating ctr_configured flag'
- FileUtils.mkdir_p(File.dirname(CTR_CONFIG_FLAG))
- FileUtils.touch(CTR_CONFIG_FLAG)
- puts 'Done.'
- puts '_'
- end
-
- def self.exec_puppetd()
- puts '_'
- puts 'Exec-ing puppet daemon'
- puts '---------------------'
- puts "Starting puppet agent..."
- exec("bash -c '/usr/bin/puppet agent --no-daemonize --detailed-exitcodes --verbose'")
- end
-end
-
-if __FILE__ == $0
- $stdout.sync = true
- $stderr.sync = true
-
- Start.setup_shared_dirs()
- Start.run_puppet_agent()
- Start.exec_puppetd()
-end
diff --git a/roles/docker_img_puppet/handlers/main.yml b/roles/docker_img_puppet/handlers/main.yml
deleted file mode 100644
index 9b5fe2b3d..000000000
--- a/roles/docker_img_puppet/handlers/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-# handlers file for docker_img_build
diff --git a/roles/docker_img_puppet/meta/main.yml b/roles/docker_img_puppet/meta/main.yml
deleted file mode 100644
index 40f83bf2f..000000000
--- a/roles/docker_img_puppet/meta/main.yml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-galaxy_info:
- author: Thomas Wiest
- description: Tools to do docker image builds
- company: Red Hat
- license: ASL 2.0
- min_ansible_version: 1.6
- platforms:
- - name: EL
- versions:
- - 7
- categories:
- - docker
-dependencies: []
diff --git a/roles/docker_img_puppet/tasks/main.yml b/roles/docker_img_puppet/tasks/main.yml
deleted file mode 100644
index 87741b6c1..000000000
--- a/roles/docker_img_puppet/tasks/main.yml
+++ /dev/null
@@ -1,10 +0,0 @@
----
-- name: deploy puppet image build files
- file: dest=/usr/local/etc/containers/puppet_container mode=755 state=directory
-
-- name: deploy puppet image build files
- copy: "src=puppet_container/{{ item.name }} dest=/usr/local/etc/containers/puppet_container/{{ item.name }} mode={{ item.mode }}"
- with_items:
- - { name: 'Dockerfile', mode: '644' }
- - { name: 'service.rb', mode: '755' }
- - { name: 'start.rb', mode: '755' }
diff --git a/roles/docker_img_puppet/vars/main.yml b/roles/docker_img_puppet/vars/main.yml
deleted file mode 100644
index 3abe3ae6a..000000000
--- a/roles/docker_img_puppet/vars/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-# vars file for docker_img_puppet