pre-stage openshift docker images in our registry for osbs
Signed-off-by: Adam Miller <admiller@redhat.com>
This commit is contained in:
parent
424b91148c
commit
110c556575
2 changed files with 51 additions and 17 deletions
|
@ -6,7 +6,7 @@ datacenter: phx2
|
||||||
# usually we do not want to enable nested virt, only on some virthosts
|
# usually we do not want to enable nested virt, only on some virthosts
|
||||||
nested: false
|
nested: false
|
||||||
|
|
||||||
# most of our systems are 64bit.
|
# most of our systems are 64bit.
|
||||||
# Used to install various nagios scripts and the like.
|
# Used to install various nagios scripts and the like.
|
||||||
libdir: /usr/lib64
|
libdir: /usr/lib64
|
||||||
|
|
||||||
|
@ -34,8 +34,8 @@ mem_size: 2048
|
||||||
num_cpus: 2
|
num_cpus: 2
|
||||||
lvm_size: 20000
|
lvm_size: 20000
|
||||||
|
|
||||||
# Default netmask. Almost all our phx2 nets are /24's with the
|
# Default netmask. Almost all our phx2 nets are /24's with the
|
||||||
# exception of 10.5.124.128/25. Almost all of our non phx2 sites are
|
# exception of 10.5.124.128/25. Almost all of our non phx2 sites are
|
||||||
# less than a /24.
|
# less than a /24.
|
||||||
eth0_nm: 255.255.255.0
|
eth0_nm: 255.255.255.0
|
||||||
eth1_nm: 255.255.255.0
|
eth1_nm: 255.255.255.0
|
||||||
|
@ -51,7 +51,7 @@ virt_install_command: "{{ virt_install_command_one_nic }}"
|
||||||
main_bridge: br0
|
main_bridge: br0
|
||||||
nfs_bridge: br1
|
nfs_bridge: br1
|
||||||
|
|
||||||
virt_install_command_one_nic: virt-install -n {{ inventory_hostname }}
|
virt_install_command_one_nic: virt-install -n {{ inventory_hostname }}
|
||||||
--memory={{ mem_size }},maxmemory={{ max_mem_size }} --memballoon virtio
|
--memory={{ mem_size }},maxmemory={{ max_mem_size }} --memballoon virtio
|
||||||
--disk bus=virtio,path={{ volgroup }}/{{ inventory_hostname }}
|
--disk bus=virtio,path={{ volgroup }}/{{ inventory_hostname }}
|
||||||
--vcpus={{ num_cpus }},maxvcpus={{ max_cpu }} -l {{ ks_repo }} -x
|
--vcpus={{ num_cpus }},maxvcpus={{ max_cpu }} -l {{ ks_repo }} -x
|
||||||
|
@ -61,7 +61,7 @@ virt_install_command_one_nic: virt-install -n {{ inventory_hostname }}
|
||||||
--network bridge={{ main_bridge }},model=virtio
|
--network bridge={{ main_bridge }},model=virtio
|
||||||
--autostart --noautoconsole --watchdog default
|
--autostart --noautoconsole --watchdog default
|
||||||
|
|
||||||
virt_install_command_two_nic: virt-install -n {{ inventory_hostname }}
|
virt_install_command_two_nic: virt-install -n {{ inventory_hostname }}
|
||||||
--memory={{ mem_size }},maxmemory={{ max_mem_size }} --memballoon virtio
|
--memory={{ mem_size }},maxmemory={{ max_mem_size }} --memballoon virtio
|
||||||
--disk bus=virtio,path={{ volgroup }}/{{ inventory_hostname }}
|
--disk bus=virtio,path={{ volgroup }}/{{ inventory_hostname }}
|
||||||
--vcpus={{ num_cpus }},maxvcpus={{ max_cpu }} -l {{ ks_repo }} -x
|
--vcpus={{ num_cpus }},maxvcpus={{ max_cpu }} -l {{ ks_repo }} -x
|
||||||
|
@ -75,10 +75,10 @@ virt_install_command_two_nic: virt-install -n {{ inventory_hostname }}
|
||||||
virt_install_command_rhel6: virt-install -n {{ inventory_hostname }}
|
virt_install_command_rhel6: virt-install -n {{ inventory_hostname }}
|
||||||
--memory={{ mem_size }},maxmemory={{ max_mem_size }}
|
--memory={{ mem_size }},maxmemory={{ max_mem_size }}
|
||||||
--disk bus=virtio,path={{ volgroup }}/{{ inventory_hostname }}
|
--disk bus=virtio,path={{ volgroup }}/{{ inventory_hostname }}
|
||||||
--vcpus={{ num_cpus }},maxvcpus={{ max_cpu }} -l {{ ks_repo }} -x
|
--vcpus={{ num_cpus }},maxvcpus={{ max_cpu }} -l {{ ks_repo }} -x
|
||||||
"ksdevice=eth0 ks={{ ks_url }} ip={{ eth0_ip }} netmask={{ nm }}
|
"ksdevice=eth0 ks={{ ks_url }} ip={{ eth0_ip }} netmask={{ nm }}
|
||||||
gateway={{ gw }} dns={{ dns }} console=tty0 console=ttyS0
|
gateway={{ gw }} dns={{ dns }} console=tty0 console=ttyS0
|
||||||
hostname={{ inventory_hostname }}"
|
hostname={{ inventory_hostname }}"
|
||||||
--network=bridge=br0 --autostart --noautoconsole --watchdog default
|
--network=bridge=br0 --autostart --noautoconsole --watchdog default
|
||||||
|
|
||||||
max_mem_size: "{{ mem_size * 5 }}"
|
max_mem_size: "{{ mem_size * 5 }}"
|
||||||
|
@ -132,19 +132,19 @@ nrpe_procs_crit: 300
|
||||||
nrpe_check_postfix_queue_warn: 2
|
nrpe_check_postfix_queue_warn: 2
|
||||||
nrpe_check_postfix_queue_crit: 5
|
nrpe_check_postfix_queue_crit: 5
|
||||||
|
|
||||||
# env is staging or production, we default it to production here.
|
# env is staging or production, we default it to production here.
|
||||||
env: production
|
env: production
|
||||||
env_suffix:
|
env_suffix:
|
||||||
|
|
||||||
# nfs mount options, override at the group/host level
|
# nfs mount options, override at the group/host level
|
||||||
nfs_mount_opts: "ro,hard,bg,intr,noatime,nodev,nosuid,nfsvers=4"
|
nfs_mount_opts: "ro,hard,bg,intr,noatime,nodev,nosuid,nfsvers=4"
|
||||||
|
|
||||||
# by default set become to false here We can override it as needed.
|
# by default set become to false here We can override it as needed.
|
||||||
# Note that if become is true, you need to unset requiretty for
|
# Note that if become is true, you need to unset requiretty for
|
||||||
# ssh controlpersist to work.
|
# ssh controlpersist to work.
|
||||||
become: false
|
become: false
|
||||||
|
|
||||||
# default the root_auth_users to nothing.
|
# default the root_auth_users to nothing.
|
||||||
# This should be set for cloud instances in their host or group vars.
|
# This should be set for cloud instances in their host or group vars.
|
||||||
root_auth_users: ''
|
root_auth_users: ''
|
||||||
|
|
||||||
|
@ -160,3 +160,8 @@ csi_relationship: |
|
||||||
* What hosts/services rely on this?
|
* What hosts/services rely on this?
|
||||||
|
|
||||||
To update this text, add the csi_* vars to group_vars/ in ansible.
|
To update this text, add the csi_* vars to group_vars/ in ansible.
|
||||||
|
|
||||||
|
|
||||||
|
# docker images required by OpenShift Origin
|
||||||
|
openshift_required_images:
|
||||||
|
- "openshift/origin-pod"
|
||||||
|
|
|
@ -191,6 +191,32 @@
|
||||||
when: env == "production"
|
when: env == "production"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- name: register origin_version
|
||||||
|
shell: "rpm -q origin --qf '%{Version}'"
|
||||||
|
register: origin_version
|
||||||
|
|
||||||
|
- name: pre-stage content in our docker registry
|
||||||
|
hosts: compose-x86-01.phx2.fedoraproject.org
|
||||||
|
user: root
|
||||||
|
gather_facts: True
|
||||||
|
tags:
|
||||||
|
- releng-compose
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: pull openshift required docker images
|
||||||
|
shell: "docker pull {{item}}:v{{origin_version.stdout}}"
|
||||||
|
with_items: {{openshift_required_images}}
|
||||||
|
|
||||||
|
- name: tag openshift required docker images for our registry
|
||||||
|
shell: "docker tag {{item}}:v{{origin_version.stdout}} {{docker_registry}}/{{item}}:v{{origin_version.stdout}}"
|
||||||
|
with_items: {{openshift_required_images}}
|
||||||
|
|
||||||
|
- name: push openshift required docker images to our registry
|
||||||
|
shell: "docker push {{docker_registry}}/{{item}}:v{{origin_version.stdout}}"
|
||||||
|
with_items: {{openshift_required_images}}
|
||||||
|
|
||||||
- name: post-install osbs tasks
|
- name: post-install osbs tasks
|
||||||
hosts: osbs:osbs-stg
|
hosts: osbs:osbs-stg
|
||||||
vars_files:
|
vars_files:
|
||||||
|
@ -281,10 +307,13 @@
|
||||||
dest: /etc/osbs/buildroot/atomic-reactor.tar.gz
|
dest: /etc/osbs/buildroot/atomic-reactor.tar.gz
|
||||||
state: hard
|
state: hard
|
||||||
|
|
||||||
- name: pull openshift required docker images and tag locally
|
- name: pull openshift required docker images
|
||||||
shell: "docker pull {{docker_registry}}/{{item}}:v$(rpm -q origin --qf '%{Version}') && docker tag {{docker_registry}}/{{item}}:v$(rpm -q origin --qf '%{Version}') {{item}}:v$(rpm -q origin --qf '%{Version}')"
|
shell: "docker pull {{docker_registry}}/{{item}}:v{{origin_version.stdout}}"
|
||||||
with_items:
|
with_items: {{openshift_required_images}}
|
||||||
- "openshift/origin-pod"
|
|
||||||
|
- name: tag openshift required docker images locally
|
||||||
|
shell: "docker tag {{docker_registry}}/{{item}}:v{{origin_version.stdout}} {{item}}:v{{origin_version.stdout}}"
|
||||||
|
with_items: {{openshift_required_images}}
|
||||||
|
|
||||||
- name: refresh fedora image streams
|
- name: refresh fedora image streams
|
||||||
shell: "oc import-image fedora --all"
|
shell: "oc import-image fedora --all"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue