diff options
Diffstat (limited to 'roles')
62 files changed, 1680 insertions, 0 deletions
diff --git a/roles/base_os/files/irbrc b/roles/base_os/files/irbrc new file mode 100644 index 000000000..47374e920 --- /dev/null +++ b/roles/base_os/files/irbrc @@ -0,0 +1,2 @@ +require 'irb/completion' +IRB.conf[:PROMPT_MODE] = :SIMPLE diff --git a/roles/base_os/files/vimrc b/roles/base_os/files/vimrc new file mode 100644 index 000000000..537b944ed --- /dev/null +++ b/roles/base_os/files/vimrc @@ -0,0 +1,12 @@ +set tabstop=4 +set shiftwidth=4 +set expandtab +set list + +"flag problematic whitespace (trailing and spaces before tabs) +"Note you get the same by doing let c_space_errors=1 but +"this rule really applies to everything. +highlight RedundantSpaces term=standout ctermbg=red guibg=red +match RedundantSpaces /\s\+$\| \+\ze\t/ "\ze sets end of match so only spaces highlighted +"use :set list! to toggle visible whitespace on/off +set listchars=tab:>-,trail:.,extends:> diff --git a/roles/base_os/tasks/main.yaml b/roles/base_os/tasks/main.yaml new file mode 100644 index 000000000..ff8cfbe33 --- /dev/null +++ b/roles/base_os/tasks/main.yaml @@ -0,0 +1,26 @@ +--- +# basic role, configures irbrc, vimrc + +- name: Ensure irbrc is installed for user root + copy: > + src=irbrc + dest=/root/.irbrc + +- name: Ensure vimrc is installed for user root + copy: > + src=vimrc + dest=/root/.vimrc + +- name: Ensure vimrc is installed for user root + copy: > + src=vimrc + dest=/root/.vimrc + +- name: Install firewalld + yum: pkg=firewalld state=installed + +- name: enable firewalld service + command: /usr/bin/systemctl enable firewalld.service + +- name: start firewalld service + command: /usr/bin/systemctl start firewalld.service diff --git a/roles/docker/README.md b/roles/docker/README.md new file mode 100644 index 000000000..225dd44b9 --- /dev/null +++ b/roles/docker/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml new file mode 100644 index 000000000..f0327f611 --- /dev/null +++ b/roles/docker/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for docker diff --git a/roles/docker/files/enter-container.sh b/roles/docker/files/enter-container.sh new file mode 100755 index 000000000..7cf5b8d83 --- /dev/null +++ b/roles/docker/files/enter-container.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +if [ $# -ne 1 ] +then + echo + echo "Usage: $(basename $0) <container_name>" + echo + exit 1 +fi + +PID=$(docker inspect --format '{{.State.Pid}}' $1) + +nsenter --target $PID --mount --uts --ipc --net --pid diff --git a/roles/docker/handlers/main.yml b/roles/docker/handlers/main.yml new file mode 100644 index 000000000..a2bea013a --- /dev/null +++ b/roles/docker/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for docker diff --git a/roles/docker/meta/main.yml b/roles/docker/meta/main.yml new file mode 100644 index 000000000..c5c362c60 --- /dev/null +++ b/roles/docker/meta/main.yml @@ -0,0 +1,124 @@ +--- +galaxy_info: + author: your name + description: + company: your company (optional) + # Some suggested licenses: + # - BSD (default) + # - MIT + # - GPLv2 + # - GPLv3 + # - Apache + # - CC-BY + license: license (GPLv2, CC-BY, etc) + min_ansible_version: 1.2 + # + # Below are all platforms currently available. Just uncomment + # the ones that apply to your role. If you don't see your + # platform on this list, let us know and we'll get it added! + # + #platforms: + #- name: EL + # versions: + # - all + # - 5 + # - 6 + # - 7 + #- name: GenericUNIX + # versions: + # - all + # - any + #- name: Fedora + # versions: + # - all + # - 16 + # - 17 + # - 18 + # - 19 + # - 20 + #- name: opensuse + # versions: + # - all + # - 12.1 + # - 12.2 + # - 12.3 + # - 13.1 + # - 13.2 + #- name: Amazon + # versions: + # - all + # - 2013.03 + # - 2013.09 + #- name: GenericBSD + # versions: + # - all + # - any + #- name: FreeBSD + # versions: + # - all + # - 8.0 + # - 8.1 + # - 8.2 + # - 8.3 + # - 8.4 + # - 9.0 + # - 9.1 + # - 9.1 + # - 9.2 + #- name: Ubuntu + # versions: + # - all + # - lucid + # - maverick + # - natty + # - oneiric + # - precise + # - quantal + # - raring + # - saucy + # - trusty + #- name: SLES + # versions: + # - all + # - 10SP3 + # - 10SP4 + # - 11 + # - 11SP1 + # - 11SP2 + # - 11SP3 + #- name: GenericLinux + # versions: + # - all + # - any + #- name: Debian + # versions: + # - all + # - etch + # - lenny + # - squeeze + # - wheezy + # + # Below are all categories currently available. Just as with + # the platforms above, uncomment those that apply to your role. + # + #categories: + #- cloud + #- cloud:ec2 + #- cloud:gce + #- cloud:rax + #- clustering + #- database + #- database:nosql + #- database:sql + #- development + #- monitoring + #- networking + #- packaging + #- system + #- web +dependencies: [] + # List your role dependencies here, one per line. Only + # dependencies available via galaxy should be listed here. + # Be sure to remove the '[]' above if you add dependencies + # to this list. + diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml new file mode 100644 index 000000000..2223bb675 --- /dev/null +++ b/roles/docker/tasks/main.yml @@ -0,0 +1,18 @@ +--- +# tasks file for docker +- name: Install docker + yum: pkg=docker + +- name: enable docker service + command: /usr/bin/systemctl enable docker.service + +- name: start the docker service + command: /usr/bin/systemctl start docker.service + +- copy: src=enter-container.sh dest=/usr/local/bin/enter-container.sh mode=0755 + +# From the origin rpm there exists instructions on how to +# setup origin properly. The following steps come from there +- name: Change root to be in the Docker group + command: usermod -G docker -a root + diff --git a/roles/docker/vars/main.yml b/roles/docker/vars/main.yml new file mode 100644 index 000000000..3806b4c7e --- /dev/null +++ b/roles/docker/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for docker diff --git a/roles/etcd/README.md b/roles/etcd/README.md new file mode 100644 index 000000000..225dd44b9 --- /dev/null +++ b/roles/etcd/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/etcd/defaults/main.yml b/roles/etcd/defaults/main.yml new file mode 100644 index 000000000..8e1a0fa3d --- /dev/null +++ b/roles/etcd/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for etcd diff --git a/roles/etcd/handlers/main.yml b/roles/etcd/handlers/main.yml new file mode 100644 index 000000000..b897913f9 --- /dev/null +++ b/roles/etcd/handlers/main.yml @@ -0,0 +1,3 @@ +--- +- name: restart etcd + service: name=etcd state=restarted diff --git a/roles/etcd/meta/main.yml b/roles/etcd/meta/main.yml new file mode 100644 index 000000000..c5c362c60 --- /dev/null +++ b/roles/etcd/meta/main.yml @@ -0,0 +1,124 @@ +--- +galaxy_info: + author: your name + description: + company: your company (optional) + # Some suggested licenses: + # - BSD (default) + # - MIT + # - GPLv2 + # - GPLv3 + # - Apache + # - CC-BY + license: license (GPLv2, CC-BY, etc) + min_ansible_version: 1.2 + # + # Below are all platforms currently available. Just uncomment + # the ones that apply to your role. If you don't see your + # platform on this list, let us know and we'll get it added! + # + #platforms: + #- name: EL + # versions: + # - all + # - 5 + # - 6 + # - 7 + #- name: GenericUNIX + # versions: + # - all + # - any + #- name: Fedora + # versions: + # - all + # - 16 + # - 17 + # - 18 + # - 19 + # - 20 + #- name: opensuse + # versions: + # - all + # - 12.1 + # - 12.2 + # - 12.3 + # - 13.1 + # - 13.2 + #- name: Amazon + # versions: + # - all + # - 2013.03 + # - 2013.09 + #- name: GenericBSD + # versions: + # - all + # - any + #- name: FreeBSD + # versions: + # - all + # - 8.0 + # - 8.1 + # - 8.2 + # - 8.3 + # - 8.4 + # - 9.0 + # - 9.1 + # - 9.1 + # - 9.2 + #- name: Ubuntu + # versions: + # - all + # - lucid + # - maverick + # - natty + # - oneiric + # - precise + # - quantal + # - raring + # - saucy + # - trusty + #- name: SLES + # versions: + # - all + # - 10SP3 + # - 10SP4 + # - 11 + # - 11SP1 + # - 11SP2 + # - 11SP3 + #- name: GenericLinux + # versions: + # - all + # - any + #- name: Debian + # versions: + # - all + # - etch + # - lenny + # - squeeze + # - wheezy + # + # Below are all categories currently available. Just as with + # the platforms above, uncomment those that apply to your role. + # + #categories: + #- cloud + #- cloud:ec2 + #- cloud:gce + #- cloud:rax + #- clustering + #- database + #- database:nosql + #- database:sql + #- development + #- monitoring + #- networking + #- packaging + #- system + #- web +dependencies: [] + # List your role dependencies here, one per line. Only + # dependencies available via galaxy should be listed here. + # Be sure to remove the '[]' above if you add dependencies + # to this list. + diff --git a/roles/etcd/tasks/main.yml b/roles/etcd/tasks/main.yml new file mode 100644 index 000000000..062d2e8a9 --- /dev/null +++ b/roles/etcd/tasks/main.yml @@ -0,0 +1,20 @@ +--- +- name: Install etcd + yum: pkg=etcd state=installed disable_gpg_check=yes + +- name: Install etcdctl + yum: pkg=etcdctl state=installed disable_gpg_check=yes + +- name: Write etcd global config file + template: src=etcd.conf.j2 dest=/etc/etcd/etcd.conf + notify: + - restart etcd + +- name: Open firewalld port for etcd + firewalld: port=4001/tcp permanent=false state=enabled + +- name: Save firewalld port for etcd + firewalld: port=4001/tcp permanent=true state=enabled + +- name: Enable etcd + service: name=etcd enabled=yes state=started diff --git a/roles/etcd/templates/etcd.conf.j2 b/roles/etcd/templates/etcd.conf.j2 new file mode 100644 index 000000000..1b43f6552 --- /dev/null +++ b/roles/etcd/templates/etcd.conf.j2 @@ -0,0 +1,34 @@ +# This configuration file is written in [TOML](https://github.com/mojombo/toml) + +# addr = "127.0.0.1:4001" +# bind_addr = "127.0.0.1:4001" +# ca_file = "" +# cert_file = "" +# cors = [] +# cpu_profile_file = "" +# data_dir = "." +# discovery = "http://etcd.local:4001/v2/keys/_etcd/registry/examplecluster" +# http_read_timeout = 10 +# http_write_timeout = 10 +# key_file = "" +# peers = [] +# peers_file = "" +# max_cluster_size = 9 +# max_result_buffer = 1024 +# max_retry_attempts = 3 +# name = "default-name" +# snapshot = false +# verbose = false +# very_verbose = false + +# [peer] +# addr = "127.0.0.1:7001" +# bind_addr = "127.0.0.1:7001" +# ca_file = "" +# cert_file = "" +# key_file = "" + +# [cluster] +# active_size = 9 +# remove_delay = 1800.0 +# sync_interval = 5.0 diff --git a/roles/etcd/vars/main.yml b/roles/etcd/vars/main.yml new file mode 100644 index 000000000..508856abe --- /dev/null +++ b/roles/etcd/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for etcd diff --git a/roles/kubernetes_apiserver/README.md b/roles/kubernetes_apiserver/README.md new file mode 100644 index 000000000..225dd44b9 --- /dev/null +++ b/roles/kubernetes_apiserver/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/kubernetes_apiserver/defaults/main.yml b/roles/kubernetes_apiserver/defaults/main.yml new file mode 100644 index 000000000..ab2f8bd50 --- /dev/null +++ b/roles/kubernetes_apiserver/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for kubernetes_apiserver diff --git a/roles/kubernetes_apiserver/handlers/main.yml b/roles/kubernetes_apiserver/handlers/main.yml new file mode 100644 index 000000000..5ecb096f0 --- /dev/null +++ b/roles/kubernetes_apiserver/handlers/main.yml @@ -0,0 +1,4 @@ +--- +# handlers file for kubernetes_apiserver +- name: restart kubernetes-apiserver + service: name=kubernetes-apiserver state=restarted diff --git a/roles/kubernetes_apiserver/meta/main.yml b/roles/kubernetes_apiserver/meta/main.yml new file mode 100644 index 000000000..c5c362c60 --- /dev/null +++ b/roles/kubernetes_apiserver/meta/main.yml @@ -0,0 +1,124 @@ +--- +galaxy_info: + author: your name + description: + company: your company (optional) + # Some suggested licenses: + # - BSD (default) + # - MIT + # - GPLv2 + # - GPLv3 + # - Apache + # - CC-BY + license: license (GPLv2, CC-BY, etc) + min_ansible_version: 1.2 + # + # Below are all platforms currently available. Just uncomment + # the ones that apply to your role. If you don't see your + # platform on this list, let us know and we'll get it added! + # + #platforms: + #- name: EL + # versions: + # - all + # - 5 + # - 6 + # - 7 + #- name: GenericUNIX + # versions: + # - all + # - any + #- name: Fedora + # versions: + # - all + # - 16 + # - 17 + # - 18 + # - 19 + # - 20 + #- name: opensuse + # versions: + # - all + # - 12.1 + # - 12.2 + # - 12.3 + # - 13.1 + # - 13.2 + #- name: Amazon + # versions: + # - all + # - 2013.03 + # - 2013.09 + #- name: GenericBSD + # versions: + # - all + # - any + #- name: FreeBSD + # versions: + # - all + # - 8.0 + # - 8.1 + # - 8.2 + # - 8.3 + # - 8.4 + # - 9.0 + # - 9.1 + # - 9.1 + # - 9.2 + #- name: Ubuntu + # versions: + # - all + # - lucid + # - maverick + # - natty + # - oneiric + # - precise + # - quantal + # - raring + # - saucy + # - trusty + #- name: SLES + # versions: + # - all + # - 10SP3 + # - 10SP4 + # - 11 + # - 11SP1 + # - 11SP2 + # - 11SP3 + #- name: GenericLinux + # versions: + # - all + # - any + #- name: Debian + # versions: + # - all + # - etch + # - lenny + # - squeeze + # - wheezy + # + # Below are all categories currently available. Just as with + # the platforms above, uncomment those that apply to your role. + # + #categories: + #- cloud + #- cloud:ec2 + #- cloud:gce + #- cloud:rax + #- clustering + #- database + #- database:nosql + #- database:sql + #- development + #- monitoring + #- networking + #- packaging + #- system + #- web +dependencies: [] + # List your role dependencies here, one per line. Only + # dependencies available via galaxy should be listed here. + # Be sure to remove the '[]' above if you add dependencies + # to this list. + diff --git a/roles/kubernetes_apiserver/tasks/main.yml b/roles/kubernetes_apiserver/tasks/main.yml new file mode 100644 index 000000000..622ecd5ca --- /dev/null +++ b/roles/kubernetes_apiserver/tasks/main.yml @@ -0,0 +1,25 @@ +--- +# tasks file for kubernetes_apiserver +- name: Install kubernetes + yum: pkg=kubernetes + +- name: Configure apiserver settings + lineinfile: > + dest=/etc/sysconfig/kubernetes + regexp={{ item.regex }} + line="{{ item.line }}" + with_items: + - { regex: '^KUBE_API_MACHINES=', line: 'KUBE_API_MACHINES=\"{{ oo_minion_ips | join(",") }}\"' } + - { regex: '^KUBE_API_ADDRESS=', line: 'KUBE_API_ADDRESS=\"0.0.0.0\"' } + notify: + - restart kubernetes-apiserver + +- name: Enable apiserver + service: name=kubernetes-apiserver enabled=yes state=started + +- name: Open firewalld port for apiserver + firewalld: port=8080/tcp permanent=false state=enabled + +- name: Save firewalld port for apiserver + firewalld: port=8080/tcp permanent=true state=enabled + diff --git a/roles/kubernetes_apiserver/vars/main.yml b/roles/kubernetes_apiserver/vars/main.yml new file mode 100644 index 000000000..1f5cb46d6 --- /dev/null +++ b/roles/kubernetes_apiserver/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for kubernetes_apiserver diff --git a/roles/kubernetes_controller_manager/README.md b/roles/kubernetes_controller_manager/README.md new file mode 100644 index 000000000..225dd44b9 --- /dev/null +++ b/roles/kubernetes_controller_manager/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/kubernetes_controller_manager/defaults/main.yml b/roles/kubernetes_controller_manager/defaults/main.yml new file mode 100644 index 000000000..205f3e164 --- /dev/null +++ b/roles/kubernetes_controller_manager/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for kubernetes_controller_manager diff --git a/roles/kubernetes_controller_manager/handlers/main.yml b/roles/kubernetes_controller_manager/handlers/main.yml new file mode 100644 index 000000000..a763ccd6c --- /dev/null +++ b/roles/kubernetes_controller_manager/handlers/main.yml @@ -0,0 +1,5 @@ +--- +# handlers file for kubernetes_controller_manager +- name: restart kubernetes-controller-manager + service: name=kubernetes-controller-manager state=restarted + diff --git a/roles/kubernetes_controller_manager/meta/main.yml b/roles/kubernetes_controller_manager/meta/main.yml new file mode 100644 index 000000000..c5c362c60 --- /dev/null +++ b/roles/kubernetes_controller_manager/meta/main.yml @@ -0,0 +1,124 @@ +--- +galaxy_info: + author: your name + description: + company: your company (optional) + # Some suggested licenses: + # - BSD (default) + # - MIT + # - GPLv2 + # - GPLv3 + # - Apache + # - CC-BY + license: license (GPLv2, CC-BY, etc) + min_ansible_version: 1.2 + # + # Below are all platforms currently available. Just uncomment + # the ones that apply to your role. If you don't see your + # platform on this list, let us know and we'll get it added! + # + #platforms: + #- name: EL + # versions: + # - all + # - 5 + # - 6 + # - 7 + #- name: GenericUNIX + # versions: + # - all + # - any + #- name: Fedora + # versions: + # - all + # - 16 + # - 17 + # - 18 + # - 19 + # - 20 + #- name: opensuse + # versions: + # - all + # - 12.1 + # - 12.2 + # - 12.3 + # - 13.1 + # - 13.2 + #- name: Amazon + # versions: + # - all + # - 2013.03 + # - 2013.09 + #- name: GenericBSD + # versions: + # - all + # - any + #- name: FreeBSD + # versions: + # - all + # - 8.0 + # - 8.1 + # - 8.2 + # - 8.3 + # - 8.4 + # - 9.0 + # - 9.1 + # - 9.1 + # - 9.2 + #- name: Ubuntu + # versions: + # - all + # - lucid + # - maverick + # - natty + # - oneiric + # - precise + # - quantal + # - raring + # - saucy + # - trusty + #- name: SLES + # versions: + # - all + # - 10SP3 + # - 10SP4 + # - 11 + # - 11SP1 + # - 11SP2 + # - 11SP3 + #- name: GenericLinux + # versions: + # - all + # - any + #- name: Debian + # versions: + # - all + # - etch + # - lenny + # - squeeze + # - wheezy + # + # Below are all categories currently available. Just as with + # the platforms above, uncomment those that apply to your role. + # + #categories: + #- cloud + #- cloud:ec2 + #- cloud:gce + #- cloud:rax + #- clustering + #- database + #- database:nosql + #- database:sql + #- development + #- monitoring + #- networking + #- packaging + #- system + #- web +dependencies: [] + # List your role dependencies here, one per line. Only + # dependencies available via galaxy should be listed here. + # Be sure to remove the '[]' above if you add dependencies + # to this list. + diff --git a/roles/kubernetes_controller_manager/tasks/main.yml b/roles/kubernetes_controller_manager/tasks/main.yml new file mode 100644 index 000000000..68aee6f19 --- /dev/null +++ b/roles/kubernetes_controller_manager/tasks/main.yml @@ -0,0 +1,7 @@ +--- +# tasks file for kubernetes_controller_manager +- name: Install kubernetes + yum: pkg=kubernetes + +- name: Enable controller-manager + service: name=kubernetes-controller-manager enabled=yes state=started diff --git a/roles/kubernetes_controller_manager/vars/main.yml b/roles/kubernetes_controller_manager/vars/main.yml new file mode 100644 index 000000000..4436c9358 --- /dev/null +++ b/roles/kubernetes_controller_manager/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for kubernetes_controller_manager diff --git a/roles/kubernetes_kubelet/README.md b/roles/kubernetes_kubelet/README.md new file mode 100644 index 000000000..225dd44b9 --- /dev/null +++ b/roles/kubernetes_kubelet/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/kubernetes_kubelet/defaults/main.yml b/roles/kubernetes_kubelet/defaults/main.yml new file mode 100644 index 000000000..72daecfe7 --- /dev/null +++ b/roles/kubernetes_kubelet/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for kubernetes_kubelet diff --git a/roles/kubernetes_kubelet/files/kubelet.service b/roles/kubernetes_kubelet/files/kubelet.service new file mode 100644 index 000000000..fef69a803 --- /dev/null +++ b/roles/kubernetes_kubelet/files/kubelet.service @@ -0,0 +1,10 @@ +[Unit] +Description=Kubernetes Kubelet Server +Documentation=https://github.com/GoogleCloudPlatform/kubernetes + +[Service] +EnvironmentFile=/etc/sysconfig/kubelet +ExecStart=/usr/local/bin/kubelet "$DAEMON_ARGS" + +[Install] +WantedBy=multi-user.target diff --git a/roles/kubernetes_kubelet/handlers/main.yml b/roles/kubernetes_kubelet/handlers/main.yml new file mode 100644 index 000000000..36b0c27b6 --- /dev/null +++ b/roles/kubernetes_kubelet/handlers/main.yml @@ -0,0 +1,4 @@ +--- +# handlers file for kubernetes_kubelet +- name: restart kubelet + service: name=kubernetes-kubelet state=restarted diff --git a/roles/kubernetes_kubelet/meta/main.yml b/roles/kubernetes_kubelet/meta/main.yml new file mode 100644 index 000000000..c5c362c60 --- /dev/null +++ b/roles/kubernetes_kubelet/meta/main.yml @@ -0,0 +1,124 @@ +--- +galaxy_info: + author: your name + description: + company: your company (optional) + # Some suggested licenses: + # - BSD (default) + # - MIT + # - GPLv2 + # - GPLv3 + # - Apache + # - CC-BY + license: license (GPLv2, CC-BY, etc) + min_ansible_version: 1.2 + # + # Below are all platforms currently available. Just uncomment + # the ones that apply to your role. If you don't see your + # platform on this list, let us know and we'll get it added! + # + #platforms: + #- name: EL + # versions: + # - all + # - 5 + # - 6 + # - 7 + #- name: GenericUNIX + # versions: + # - all + # - any + #- name: Fedora + # versions: + # - all + # - 16 + # - 17 + # - 18 + # - 19 + # - 20 + #- name: opensuse + # versions: + # - all + # - 12.1 + # - 12.2 + # - 12.3 + # - 13.1 + # - 13.2 + #- name: Amazon + # versions: + # - all + # - 2013.03 + # - 2013.09 + #- name: GenericBSD + # versions: + # - all + # - any + #- name: FreeBSD + # versions: + # - all + # - 8.0 + # - 8.1 + # - 8.2 + # - 8.3 + # - 8.4 + # - 9.0 + # - 9.1 + # - 9.1 + # - 9.2 + #- name: Ubuntu + # versions: + # - all + # - lucid + # - maverick + # - natty + # - oneiric + # - precise + # - quantal + # - raring + # - saucy + # - trusty + #- name: SLES + # versions: + # - all + # - 10SP3 + # - 10SP4 + # - 11 + # - 11SP1 + # - 11SP2 + # - 11SP3 + #- name: GenericLinux + # versions: + # - all + # - any + #- name: Debian + # versions: + # - all + # - etch + # - lenny + # - squeeze + # - wheezy + # + # Below are all categories currently available. Just as with + # the platforms above, uncomment those that apply to your role. + # + #categories: + #- cloud + #- cloud:ec2 + #- cloud:gce + #- cloud:rax + #- clustering + #- database + #- database:nosql + #- database:sql + #- development + #- monitoring + #- networking + #- packaging + #- system + #- web +dependencies: [] + # List your role dependencies here, one per line. Only + # dependencies available via galaxy should be listed here. + # Be sure to remove the '[]' above if you add dependencies + # to this list. + diff --git a/roles/kubernetes_kubelet/tasks/main.yml b/roles/kubernetes_kubelet/tasks/main.yml new file mode 100644 index 000000000..48eab7f84 --- /dev/null +++ b/roles/kubernetes_kubelet/tasks/main.yml @@ -0,0 +1,31 @@ +--- +# tasks file for kubernetes_kubelet +- name: Install kubernetes + yum: pkg=kubernetes state=installed + +- name: Configure kubelet + lineinfile: > + dest=/etc/sysconfig/kubernetes + regexp={{ item.regex }} + line="{{ item.line }}" + with_items: + - { regex: '^KUBE_ETCD_SERVERS=', line: 'KUBE_ETCD_SERVERS=\"http://{{ oo_master_ips[0] }}:4001\"' } + - { regex: '^KUBE_KUBELET_ADDRESS=', line: 'KUBE_KUBELET_ADDRESS=\"0.0.0.0\"' } + - { regex: '^KUBE_KUBELET_HOSTNAME_OVERRIDE=', line: 'KUBE_KUBELET_HOSTNAME_OVERRIDE=\"{{ hostvars[inventory_hostname].ansible_eth0.ipv4.address }}\"' } + notify: + - restart kubelet + + +#- name: write the cadvisor config +# template: src=cadvisor.manifest dest=/etc/kubernetes/manifests/cadvisor.manifest +# notify: +# - restart kubelet + +- name: Enable kubelet + service: name=kubernetes-kubelet enabled=yes state=started + +- name: Open firewalld port for the kubelet + firewalld: port=10250/tcp permanent=false state=enabled + +- name: Save firewalld port for the kubelet + firewalld: port=10250/tcp permanent=true state=enabled diff --git a/roles/kubernetes_kubelet/templates/cadvisor.manifest b/roles/kubernetes_kubelet/templates/cadvisor.manifest new file mode 100644 index 000000000..064803cbe --- /dev/null +++ b/roles/kubernetes_kubelet/templates/cadvisor.manifest @@ -0,0 +1,33 @@ +version: v1beta2 +id: cadvisor-agent +containers: + - name: cadvisor + image: google/cadvisor:latest + ports: + - name: http + containerPort: 8080 + hostPort: 4194 + volumeMounts: + - name: varrun + mountPath: /var/run + readOnly: false + - name: varlibdocker + mountPath: /var/lib/docker + readOnly: true + - name: cgroups + mountPath: /sys/fs/cgroup + readOnly: true +volumes: + - name: varrun + source: + hostDir: + path: /var/run + - name: varlibdocker + source: + hostDir: + path: /var/lib/docker + - name: cgroups + source: + hostDir: + path: /sys/fs/cgroup + diff --git a/roles/kubernetes_kubelet/templates/kubelet b/roles/kubernetes_kubelet/templates/kubelet new file mode 100644 index 000000000..fbf9321fe --- /dev/null +++ b/roles/kubernetes_kubelet/templates/kubelet @@ -0,0 +1,3 @@ + +DAEMON_ARGS=" -etcd_servers=http://10.245.1.2:4001 -hostname_override=10.245.2.2 -address=0.0.0.0 -config=/etc/kubernetes/manifests" + diff --git a/roles/kubernetes_kubelet/vars/main.yml b/roles/kubernetes_kubelet/vars/main.yml new file mode 100644 index 000000000..000e642a2 --- /dev/null +++ b/roles/kubernetes_kubelet/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for kubernetes_kubelet diff --git a/roles/kubernetes_proxy/README.md b/roles/kubernetes_proxy/README.md new file mode 100644 index 000000000..225dd44b9 --- /dev/null +++ b/roles/kubernetes_proxy/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/kubernetes_proxy/defaults/main.yml b/roles/kubernetes_proxy/defaults/main.yml new file mode 100644 index 000000000..e0c322437 --- /dev/null +++ b/roles/kubernetes_proxy/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for kubernetes_proxy diff --git a/roles/kubernetes_proxy/handlers/main.yml b/roles/kubernetes_proxy/handlers/main.yml new file mode 100644 index 000000000..86ddde519 --- /dev/null +++ b/roles/kubernetes_proxy/handlers/main.yml @@ -0,0 +1,4 @@ +--- +# handlers file for kubernetes_proxy +- name: restart kubernetes-proxy + service: name=kubernetes-proxy state=restarted diff --git a/roles/kubernetes_proxy/meta/main.yml b/roles/kubernetes_proxy/meta/main.yml new file mode 100644 index 000000000..c5c362c60 --- /dev/null +++ b/roles/kubernetes_proxy/meta/main.yml @@ -0,0 +1,124 @@ +--- +galaxy_info: + author: your name + description: + company: your company (optional) + # Some suggested licenses: + # - BSD (default) + # - MIT + # - GPLv2 + # - GPLv3 + # - Apache + # - CC-BY + license: license (GPLv2, CC-BY, etc) + min_ansible_version: 1.2 + # + # Below are all platforms currently available. Just uncomment + # the ones that apply to your role. If you don't see your + # platform on this list, let us know and we'll get it added! + # + #platforms: + #- name: EL + # versions: + # - all + # - 5 + # - 6 + # - 7 + #- name: GenericUNIX + # versions: + # - all + # - any + #- name: Fedora + # versions: + # - all + # - 16 + # - 17 + # - 18 + # - 19 + # - 20 + #- name: opensuse + # versions: + # - all + # - 12.1 + # - 12.2 + # - 12.3 + # - 13.1 + # - 13.2 + #- name: Amazon + # versions: + # - all + # - 2013.03 + # - 2013.09 + #- name: GenericBSD + # versions: + # - all + # - any + #- name: FreeBSD + # versions: + # - all + # - 8.0 + # - 8.1 + # - 8.2 + # - 8.3 + # - 8.4 + # - 9.0 + # - 9.1 + # - 9.1 + # - 9.2 + #- name: Ubuntu + # versions: + # - all + # - lucid + # - maverick + # - natty + # - oneiric + # - precise + # - quantal + # - raring + # - saucy + # - trusty + #- name: SLES + # versions: + # - all + # - 10SP3 + # - 10SP4 + # - 11 + # - 11SP1 + # - 11SP2 + # - 11SP3 + #- name: GenericLinux + # versions: + # - all + # - any + #- name: Debian + # versions: + # - all + # - etch + # - lenny + # - squeeze + # - wheezy + # + # Below are all categories currently available. Just as with + # the platforms above, uncomment those that apply to your role. + # + #categories: + #- cloud + #- cloud:ec2 + #- cloud:gce + #- cloud:rax + #- clustering + #- database + #- database:nosql + #- database:sql + #- development + #- monitoring + #- networking + #- packaging + #- system + #- web +dependencies: [] + # List your role dependencies here, one per line. Only + # dependencies available via galaxy should be listed here. + # Be sure to remove the '[]' above if you add dependencies + # to this list. + diff --git a/roles/kubernetes_proxy/tasks/main.yml b/roles/kubernetes_proxy/tasks/main.yml new file mode 100644 index 000000000..901b5f3ad --- /dev/null +++ b/roles/kubernetes_proxy/tasks/main.yml @@ -0,0 +1,17 @@ +--- +# tasks file for kubernetes_proxy +- name: Install kubernetes + yum: pkg=kubernetes state=installed + +- name: Configure kubernetes-proxy etcd servers + lineinfile: > + dest=/etc/sysconfig/kubernetes + regexp={{ item.regex }} + line="{{ item.line }}" + with_items: + - { regex: '^KUBE_ETCD_SERVERS=', line: 'KUBE_ETCD_SERVERS=\"http://{{ oo_master_ips[0] }}:4001\"' } + notify: + - restart kubernetes-proxy + +- name: Enable proxy + service: name=kubernetes-proxy enabled=yes state=started diff --git a/roles/kubernetes_proxy/vars/main.yml b/roles/kubernetes_proxy/vars/main.yml new file mode 100644 index 000000000..cbdcaa90d --- /dev/null +++ b/roles/kubernetes_proxy/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for kubernetes_proxy diff --git a/roles/pods/README.md b/roles/pods/README.md new file mode 100644 index 000000000..225dd44b9 --- /dev/null +++ b/roles/pods/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/pods/defaults/main.yml b/roles/pods/defaults/main.yml new file mode 100644 index 000000000..027ac0fd8 --- /dev/null +++ b/roles/pods/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for pods diff --git a/roles/pods/files/pods/fedora_apache.json b/roles/pods/files/pods/fedora_apache.json new file mode 100644 index 000000000..54eb712c2 --- /dev/null +++ b/roles/pods/files/pods/fedora_apache.json @@ -0,0 +1,21 @@ +{ + "id": "apache", + "desiredState": { + "manifest": { + "version": "v1beta1", + "id": "apache-1", + "containers": [{ + "name": "master", + "image": "fedora/apache", + "ports": [{ + "containerPort": 80, + "hostPort": 80 + }] + }] + } + }, + "labels": { + "name": "apache", + "distro": "fedora" + } +} diff --git a/roles/pods/files/pods/frontend-controller.json b/roles/pods/files/pods/frontend-controller.json new file mode 100644 index 000000000..1558724b6 --- /dev/null +++ b/roles/pods/files/pods/frontend-controller.json @@ -0,0 +1,23 @@ +{ + "id": "frontendController", + "kind": "ReplicationController", + "apiVersion": "v1beta1", + "desiredState": { + "replicas": 2, + "replicaSelector": {"name": "frontend"}, + "podTemplate": { + "desiredState": { + "manifest": { + "version": "v1beta1", + "id": "frontendController", + "containers": [{ + "name": "php-redis", + "image": "brendanburns/php-redis", + "ports": [{"containerPort": 80, "hostPort": 8000}] + }] + } + }, + "labels": {"name": "frontend"} + }}, + "labels": {"name": "frontend"} +} diff --git a/roles/pods/files/pods/redis-master-service.json b/roles/pods/files/pods/redis-master-service.json new file mode 100644 index 000000000..80808dcd6 --- /dev/null +++ b/roles/pods/files/pods/redis-master-service.json @@ -0,0 +1,10 @@ +{ + "id": "redismaster", + "kind": "Service", + "apiVersion": "v1beta1", + "port": 10000, + "containerPort": 6379, + "selector": { + "name": "redis-master" + } +} diff --git a/roles/pods/files/pods/redis-master.json b/roles/pods/files/pods/redis-master.json new file mode 100644 index 000000000..71acea530 --- /dev/null +++ b/roles/pods/files/pods/redis-master.json @@ -0,0 +1,22 @@ +{ + "id": "redis-master-2", + "kind": "Pod", + "apiVersion": "v1beta1", + "desiredState": { + "manifest": { + "version": "v1beta1", + "id": "redis-master-2", + "containers": [{ + "name": "master", + "image": "dockerfile/redis", + "ports": [{ + "containerPort": 6379, + "hostPort": 6379 + }] + }] + } + }, + "labels": { + "name": "redis-master" + } +} diff --git a/roles/pods/files/pods/redis-slave-controller.json b/roles/pods/files/pods/redis-slave-controller.json new file mode 100644 index 000000000..5c8d1ea30 --- /dev/null +++ b/roles/pods/files/pods/redis-slave-controller.json @@ -0,0 +1,24 @@ +{ + "id": "redisSlaveController", + "kind": "ReplicationController", + "apiVersion": "v1beta1", + "desiredState": { + "replicas": 2, + "replicaSelector": {"name": "redisslave"}, + "podTemplate": { + "desiredState": { + "manifest": { + "version": "v1beta1", + "id": "redisSlaveController", + "containers": [{ + "name": "slave", + "image": "brendanburns/redis-slave", + "ports": [{"containerPort": 6379, "hostPort": 6380}] + }] + } + }, + "labels": {"name": "redisslave"} + }}, + "labels": {"name": "redisslave"} +} + diff --git a/roles/pods/files/pods/redis-slave-service.json b/roles/pods/files/pods/redis-slave-service.json new file mode 100644 index 000000000..f90a9be9f --- /dev/null +++ b/roles/pods/files/pods/redis-slave-service.json @@ -0,0 +1,13 @@ +{ + "id": "redisslave", + "kind": "Service", + "apiVersion": "v1beta1", + "port": 10001, + "containerPort": 6379, + "labels": { + "name": "redisslave" + }, + "selector": { + "name": "redisslave" + } +} diff --git a/roles/pods/handlers/main.yml b/roles/pods/handlers/main.yml new file mode 100644 index 000000000..809f95836 --- /dev/null +++ b/roles/pods/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for pods diff --git a/roles/pods/meta/main.yml b/roles/pods/meta/main.yml new file mode 100644 index 000000000..c5c362c60 --- /dev/null +++ b/roles/pods/meta/main.yml @@ -0,0 +1,124 @@ +--- +galaxy_info: + author: your name + description: + company: your company (optional) + # Some suggested licenses: + # - BSD (default) + # - MIT + # - GPLv2 + # - GPLv3 + # - Apache + # - CC-BY + license: license (GPLv2, CC-BY, etc) + min_ansible_version: 1.2 + # + # Below are all platforms currently available. Just uncomment + # the ones that apply to your role. If you don't see your + # platform on this list, let us know and we'll get it added! + # + #platforms: + #- name: EL + # versions: + # - all + # - 5 + # - 6 + # - 7 + #- name: GenericUNIX + # versions: + # - all + # - any + #- name: Fedora + # versions: + # - all + # - 16 + # - 17 + # - 18 + # - 19 + # - 20 + #- name: opensuse + # versions: + # - all + # - 12.1 + # - 12.2 + # - 12.3 + # - 13.1 + # - 13.2 + #- name: Amazon + # versions: + # - all + # - 2013.03 + # - 2013.09 + #- name: GenericBSD + # versions: + # - all + # - any + #- name: FreeBSD + # versions: + # - all + # - 8.0 + # - 8.1 + # - 8.2 + # - 8.3 + # - 8.4 + # - 9.0 + # - 9.1 + # - 9.1 + # - 9.2 + #- name: Ubuntu + # versions: + # - all + # - lucid + # - maverick + # - natty + # - oneiric + # - precise + # - quantal + # - raring + # - saucy + # - trusty + #- name: SLES + # versions: + # - all + # - 10SP3 + # - 10SP4 + # - 11 + # - 11SP1 + # - 11SP2 + # - 11SP3 + #- name: GenericLinux + # versions: + # - all + # - any + #- name: Debian + # versions: + # - all + # - etch + # - lenny + # - squeeze + # - wheezy + # + # Below are all categories currently available. Just as with + # the platforms above, uncomment those that apply to your role. + # + #categories: + #- cloud + #- cloud:ec2 + #- cloud:gce + #- cloud:rax + #- clustering + #- database + #- database:nosql + #- database:sql + #- development + #- monitoring + #- networking + #- packaging + #- system + #- web +dependencies: [] + # List your role dependencies here, one per line. Only + # dependencies available via galaxy should be listed here. + # Be sure to remove the '[]' above if you add dependencies + # to this list. + diff --git a/roles/pods/tasks/main.yml b/roles/pods/tasks/main.yml new file mode 100644 index 000000000..30c387c65 --- /dev/null +++ b/roles/pods/tasks/main.yml @@ -0,0 +1,6 @@ +--- +- name: Transfer the fedora_apache pod template + file: path=/usr/local/etc/pods state=directory + +- name: Transfer the fedora_apache pod template + copy: directory_mode=on src=pods/ dest=/usr/local/etc/pods/ diff --git a/roles/pods/vars/main.yml b/roles/pods/vars/main.yml new file mode 100644 index 000000000..c9ed1df03 --- /dev/null +++ b/roles/pods/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for pods diff --git a/roles/repos/files/RPM-GPG-KEY-redhat-release b/roles/repos/files/RPM-GPG-KEY-redhat-release new file mode 100644 index 000000000..0f83b622d --- /dev/null +++ b/roles/repos/files/RPM-GPG-KEY-redhat-release @@ -0,0 +1,63 @@ +The following public key can be used to verify RPM packages built and +signed by Red Hat, Inc. This key is used for packages in Red Hat +products shipped after November 2009, and for all updates to those +products. + +Questions about this key should be sent to security@redhat.com. + +pub 4096R/FD431D51 2009-10-22 Red Hat, Inc. (release key 2) <security@redhat.com> + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQINBErgSTsBEACh2A4b0O9t+vzC9VrVtL1AKvUWi9OPCjkvR7Xd8DtJxeeMZ5eF +0HtzIG58qDRybwUe89FZprB1ffuUKzdE+HcL3FbNWSSOXVjZIersdXyH3NvnLLLF +0DNRB2ix3bXG9Rh/RXpFsNxDp2CEMdUvbYCzE79K1EnUTVh1L0Of023FtPSZXX0c +u7Pb5DI5lX5YeoXO6RoodrIGYJsVBQWnrWw4xNTconUfNPk0EGZtEnzvH2zyPoJh +XGF+Ncu9XwbalnYde10OCvSWAZ5zTCpoLMTvQjWpbCdWXJzCm6G+/hx9upke546H +5IjtYm4dTIVTnc3wvDiODgBKRzOl9rEOCIgOuGtDxRxcQkjrC+xvg5Vkqn7vBUyW +9pHedOU+PoF3DGOM+dqv+eNKBvh9YF9ugFAQBkcG7viZgvGEMGGUpzNgN7XnS1gj +/DPo9mZESOYnKceve2tIC87p2hqjrxOHuI7fkZYeNIcAoa83rBltFXaBDYhWAKS1 +PcXS1/7JzP0ky7d0L6Xbu/If5kqWQpKwUInXtySRkuraVfuK3Bpa+X1XecWi24JY +HVtlNX025xx1ewVzGNCTlWn1skQN2OOoQTV4C8/qFpTW6DTWYurd4+fE0OJFJZQF +buhfXYwmRlVOgN5i77NTIJZJQfYFj38c/Iv5vZBPokO6mffrOTv3MHWVgQARAQAB +tDNSZWQgSGF0LCBJbmMuIChyZWxlYXNlIGtleSAyKSA8c2VjdXJpdHlAcmVkaGF0 +LmNvbT6JAjYEEwECACAFAkrgSTsCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAK +CRAZni+R/UMdUWzpD/9s5SFR/ZF3yjY5VLUFLMXIKUztNN3oc45fyLdTI3+UClKC +2tEruzYjqNHhqAEXa2sN1fMrsuKec61Ll2NfvJjkLKDvgVIh7kM7aslNYVOP6BTf +C/JJ7/ufz3UZmyViH/WDl+AYdgk3JqCIO5w5ryrC9IyBzYv2m0HqYbWfphY3uHw5 +un3ndLJcu8+BGP5F+ONQEGl+DRH58Il9Jp3HwbRa7dvkPgEhfFR+1hI+Btta2C7E +0/2NKzCxZw7Lx3PBRcU92YKyaEihfy/aQKZCAuyfKiMvsmzs+4poIX7I9NQCJpyE +IGfINoZ7VxqHwRn/d5mw2MZTJjbzSf+Um9YJyA0iEEyD6qjriWQRbuxpQXmlAJbh +8okZ4gbVFv1F8MzK+4R8VvWJ0XxgtikSo72fHjwha7MAjqFnOq6eo6fEC/75g3NL +Ght5VdpGuHk0vbdENHMC8wS99e5qXGNDued3hlTavDMlEAHl34q2H9nakTGRF5Ki +JUfNh3DVRGhg8cMIti21njiRh7gyFI2OccATY7bBSr79JhuNwelHuxLrCFpY7V25 +OFktl15jZJaMxuQBqYdBgSay2G0U6D1+7VsWufpzd/Abx1/c3oi9ZaJvW22kAggq +dzdA27UUYjWvx42w9menJwh/0jeQcTecIUd0d0rFcw/c1pvgMMl/Q73yzKgKYw== +=zbHE +-----END PGP PUBLIC KEY BLOCK----- +The following public key can be used to verify RPM packages built and +signed by Red Hat, Inc. This key is a supporting (auxiliary) key for +Red Hat products shipped after November 2006 and for all updates to +those products. + +Questions about this key should be sent to security@redhat.com. + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEVwDGkRBACwPhZIpvkjI8wV9sFTDoqyPLx1ub8Sd/w+YuI5Ovm49mvvEQVT +VLg8FgE5JlST59AbsLDyVtRa9CxIvN5syBVrWWWtHtDnnylFBcqG/A6J3bI4E9/A +UtSL5Zxbav0+utP6f3wOpxQrxc+WIDVgpurdBKAQ3dsobGBqypeX6FXZ5wCgou6C +yZpGIBqosJaDWLzNeOfb/70D/1thLkQyhW3JJ6cHCYJHNfBShvbLWBf6S231mgmu +MyMlt8Kmipc9bw+saaAkSkVsQ/ZbfjrWB7e5kbMruKLVrH+nGhamlHYUGyAPtsPg +Uj/NUSj5BmrCsOkMpn43ngTLssE9MLhSPj2nIHGFv9B+iVLvomDdwnaBRgQ1aK8z +z6MAA/406yf5yVJ/MlTWs1/68VwDhosc9BtU1V5IE0NXgZUAfBJzzfVzzKQq6zJ2 +eZsMLhr96wbsW13zUZt1ing+ulwh2ee4meuJq6h/971JspFY/XBhcfq4qCNqVjsq +SZnWoGdCO6J8CxPIemD2IUHzjoyyeEj3RVydup6pcWZAmhzkKrQzUmVkIEhhdCwg +SW5jLiAoYXV4aWxpYXJ5IGtleSkgPHNlY3VyaXR5QHJlZGhhdC5jb20+iF4EExEC +AB4FAkVwDGkCGwMGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQRWiciC+mWOC1rQCg +ooNLCFOzNPcvhd9Za8C801HmnsYAniCw3yzrCqtjYnxDDxlufH0FVTwX +=d/bm +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/roles/repos/files/docker.repo b/roles/repos/files/docker.repo new file mode 100644 index 000000000..25ecf9310 --- /dev/null +++ b/roles/repos/files/docker.repo @@ -0,0 +1,5 @@ +[docker] +name= Temporary Docker rpm +baseurl=http://10.240.169.148/mirror/docker +gpgcheck=0 +enabled=1 diff --git a/roles/repos/files/epel7-kubernetes.repo b/roles/repos/files/epel7-kubernetes.repo new file mode 100644 index 000000000..1deae2939 --- /dev/null +++ b/roles/repos/files/epel7-kubernetes.repo @@ -0,0 +1,6 @@ +[maxamillion-epel7-kubernetes] +name=Copr repo for epel7-kubernetes owned by maxamillion +baseurl=http://copr-be.cloud.fedoraproject.org/results/maxamillion/epel7-kubernetes/epel-7-$basearch/ +skip_if_unavailable=True +gpgcheck=0 +enabled=1 diff --git a/roles/repos/files/oso-rhui-rhel-7-server.repo b/roles/repos/files/oso-rhui-rhel-7-server.repo new file mode 100644 index 000000000..d32070634 --- /dev/null +++ b/roles/repos/files/oso-rhui-rhel-7-server.repo @@ -0,0 +1,13 @@ +[oso-rhel-7-server] +name=Red Hat Enterprise Linux 7 Server from RHUI (RPMs) +baseurl=http://10.240.169.148/mirror/rhui-rhel-server-7-releases +enabled=1 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release + +[oso-rhel-7-server-optional] +name=Red Hat Enterprise Linux 7 Server - Optional from RHUI (RPMs) +baseurl=http://10.240.169.148/mirror/rhui-rhel-server-7-releases-optional +enabled=1 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release diff --git a/roles/repos/files/rhel-7-libra-candidate.repo b/roles/repos/files/rhel-7-libra-candidate.repo new file mode 100644 index 000000000..0901bf707 --- /dev/null +++ b/roles/repos/files/rhel-7-libra-candidate.repo @@ -0,0 +1,10 @@ +[rhel-7-libra-candidate] +name=rhel-7-libra-candidate - \$basearch +baseurl=https://mirror1.ops.rhcloud.com/libra/rhel-7-libra-candidate/\$basearch/ +gpgkey=https://mirror1.ops.rhcloud.com/libra/RPM-GPG-KEY-redhat-release https://mirror1.ops.rhcloud.com/libra/RPM-GPG-KEY-redhat-beta https://mirror1.ops.rhcloud.com/libra/RPM-GPG-KEY-redhat-openshifthosted +skip_if_unavailable=True +gpgcheck=0 +enabled=1 +sslclientcert=/var/lib/yum/client-cert.pem +sslclientkey=/var/lib/yum/client-key.pem +sslverify=False diff --git a/roles/repos/tasks/main.yaml b/roles/repos/tasks/main.yaml new file mode 100644 index 000000000..d078f9c97 --- /dev/null +++ b/roles/repos/tasks/main.yaml @@ -0,0 +1,27 @@ +--- +# The following role lays down the correct repository and gpg key for yum + +#- name: Ensure oso rhui rhel 7 server repository exists in yum.repos.d +# copy: > +# src=oso-rhui-rhel-7-server.repo +# dest=/etc/yum.repos.d/oso-rhui-rhel-7-server.repo +# +#- name: Ensure Red Hat GPG Key is in place for the previous repo +# copy: > +# src=RPM-GPG-KEY-redhat-release +# dest=/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release + +- name: Ensure rhel-7-libra-candidate client-key.pem exists + copy: src=client-key.pem dest=/var/lib/yum/client-key.pem + +- name: Ensure rhel-7-libra-candidate client-cert.pem exists + copy: src=client-cert.pem dest=/var/lib/yum/client-cert.pem + +- name: Ensure rhel 7 libra candidate exists in yum.repos.d + copy: src=rhel-7-libra-candidate.repo dest=/etc/yum.repos.d/rhel-7-libra-candidate.repo + +- name: Ensure a docker repo is laid down + copy: src=docker.repo dest=/etc/yum.repos.d/docker.repo + +- name: Ensure the kubernetes repo is available + copy: src=epel7-kubernetes.repo dest=/etc/yum.repos.d/epel7-kubernetes.repo |