copr-builders: instantiate Power9 Oregon University OpenStack
This commit is contained in:
parent
88c881048d
commit
e8bf32eb08
10 changed files with 113 additions and 5 deletions
|
@ -52,6 +52,8 @@ copr_builder_images:
|
||||||
x86_64: copr-builder-x86_64-20211012_115536
|
x86_64: copr-builder-x86_64-20211012_115536
|
||||||
ibm_cloud:
|
ibm_cloud:
|
||||||
s390x: r022-f2fa7740-6d08-47e6-9201-823f986395de
|
s390x: r022-f2fa7740-6d08-47e6-9201-823f986395de
|
||||||
|
osuosl:
|
||||||
|
ppc64le: copr-builder-ppc64le-20220112_131945
|
||||||
copr_messaging: true
|
copr_messaging: true
|
||||||
datacenter: aws
|
datacenter: aws
|
||||||
devel: false
|
devel: false
|
||||||
|
|
|
@ -51,6 +51,8 @@ copr_builder_images:
|
||||||
x86_64: copr-builder-x86_64-20211012_115536
|
x86_64: copr-builder-x86_64-20211012_115536
|
||||||
ibm_cloud:
|
ibm_cloud:
|
||||||
s390x: r022-f2fa7740-6d08-47e6-9201-823f986395de
|
s390x: r022-f2fa7740-6d08-47e6-9201-823f986395de
|
||||||
|
osuosl:
|
||||||
|
ppc64le: copr-builder-ppc64le-20220112_131945
|
||||||
copr_messaging: true
|
copr_messaging: true
|
||||||
datacenter: aws
|
datacenter: aws
|
||||||
devel: true
|
devel: true
|
||||||
|
|
|
@ -233,6 +233,7 @@
|
||||||
vars:
|
vars:
|
||||||
cloud_vars: true
|
cloud_vars: true
|
||||||
provision_directory: /home/copr/provision
|
provision_directory: /home/copr/provision
|
||||||
|
provision_user: copr
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
- python3-ibm-vpc
|
- python3-ibm-vpc
|
||||||
- resalloc
|
- resalloc
|
||||||
- resalloc-server
|
- resalloc-server
|
||||||
|
- resalloc-openstack
|
||||||
- virt-install
|
- virt-install
|
||||||
|
|
||||||
- name: See if postgreSQL is initialized
|
- name: See if postgreSQL is initialized
|
||||||
|
@ -45,6 +46,7 @@
|
||||||
- always
|
- always
|
||||||
vars:
|
vars:
|
||||||
cloud_vars: true
|
cloud_vars: true
|
||||||
|
provision_user: resalloc
|
||||||
|
|
||||||
- name: install .ansible.cfg for {{ provision_user }} user
|
- name: install .ansible.cfg for {{ provision_user }} user
|
||||||
copy: src=ansible.cfg dest=/var/lib/resallocserver/.ansible.cfg
|
copy: src=ansible.cfg dest=/var/lib/resallocserver/.ansible.cfg
|
||||||
|
@ -61,8 +63,10 @@
|
||||||
template: src="resalloc/{{ item }}.j2" dest="/var/lib/resallocserver/resalloc_provision/{{ item }}"
|
template: src="resalloc/{{ item }}.j2" dest="/var/lib/resallocserver/resalloc_provision/{{ item }}"
|
||||||
mode=755
|
mode=755
|
||||||
with_items:
|
with_items:
|
||||||
|
- vm-delete
|
||||||
- vm-release
|
- vm-release
|
||||||
- ibm-cloud-vm
|
- ibm-cloud-vm
|
||||||
|
- osuosl-vm
|
||||||
tags:
|
tags:
|
||||||
- provision_config
|
- provision_config
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
tags:
|
tags:
|
||||||
- provision_config
|
- provision_config
|
||||||
when:
|
when:
|
||||||
|
# for the hypervisor use-case
|
||||||
- cloud_vars is not defined
|
- cloud_vars is not defined
|
||||||
|
|
||||||
- name: templated provision scripts
|
- name: templated provision scripts
|
||||||
|
@ -84,3 +85,13 @@
|
||||||
path="{{ provision_directory }}/filter_plugins/os_nova.py"
|
path="{{ provision_directory }}/filter_plugins/os_nova.py"
|
||||||
tags:
|
tags:
|
||||||
- provision_config
|
- provision_config
|
||||||
|
|
||||||
|
- name: install the Oregon State University OpenStack token file on BE/HV
|
||||||
|
template:
|
||||||
|
src: "{{ roles_path }}/copr/backend/templates/provision/rc-osuosl.sh.j2"
|
||||||
|
dest: "{{ provision_directory }}/.rc-osuosl.sh"
|
||||||
|
owner: "{{ provision_user }}"
|
||||||
|
group: "{{ provision_user }}"
|
||||||
|
mode: 0600
|
||||||
|
tags:
|
||||||
|
- provision_config
|
||||||
|
|
39
roles/copr/backend/templates/provision/rc-osuosl.sh.j2
Normal file
39
roles/copr/backend/templates/provision/rc-osuosl.sh.j2
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# To use an OpenStack cloud you need to authenticate against the Identity
|
||||||
|
# service named keystone, which returns a **Token** and **Service Catalog**.
|
||||||
|
# The catalog contains the endpoints for all services the user/tenant has
|
||||||
|
# access to - such as Compute, Image Service, Identity, Object Storage, Block
|
||||||
|
# Storage, and Networking (code-named nova, glance, keystone, swift,
|
||||||
|
# cinder, and neutron).
|
||||||
|
#
|
||||||
|
# *NOTE*: Using the 3 *Identity API* does not necessarily mean any other
|
||||||
|
# OpenStack API is version 3. For example, your cloud provider may implement
|
||||||
|
# Image API v1.1, Block Storage API v2, and Compute API v2.0. OS_AUTH_URL is
|
||||||
|
# only for the Identity API served through keystone.
|
||||||
|
|
||||||
|
export OS_AUTH_URL=https://openpower-controller.osuosl.org:5000/v3
|
||||||
|
|
||||||
|
# With the addition of Keystone we have standardized on the term **project**
|
||||||
|
# as the entity that owns the resources.
|
||||||
|
export OS_PROJECT_ID=445d7c05a6cb4300a1bfb155dd92d84f
|
||||||
|
export OS_PROJECT_NAME="Fedora Copr"
|
||||||
|
export OS_USER_DOMAIN_NAME="Default"
|
||||||
|
if [ -z "$OS_USER_DOMAIN_NAME" ]; then unset OS_USER_DOMAIN_NAME; fi
|
||||||
|
export OS_PROJECT_DOMAIN_ID="default"
|
||||||
|
if [ -z "$OS_PROJECT_DOMAIN_ID" ]; then unset OS_PROJECT_DOMAIN_ID; fi
|
||||||
|
# unset v2.0 items in case set
|
||||||
|
unset OS_TENANT_ID
|
||||||
|
unset OS_TENANT_NAME
|
||||||
|
# In addition to the owning entity (tenant), OpenStack stores the entity
|
||||||
|
# performing the action as the **user**.
|
||||||
|
export OS_USERNAME="coprteam"
|
||||||
|
# With Keystone you pass the keystone password.
|
||||||
|
export OS_PASSWORD="{{ copr_openstack_osuosl_org_password }}"
|
||||||
|
# If your configuration has multiple regions, we set that information here.
|
||||||
|
# OS_REGION_NAME is optional and only valid in certain environments.
|
||||||
|
export OS_REGION_NAME="RegionOne"
|
||||||
|
# Don't leave a blank variable, unset it if it was empty
|
||||||
|
if [ -z "$OS_REGION_NAME" ]; then unset OS_REGION_NAME; fi
|
||||||
|
export OS_INTERFACE=public
|
||||||
|
export OS_IDENTITY_API_VERSION=3
|
23
roles/copr/backend/templates/resalloc/osuosl-vm.j2
Executable file
23
roles/copr/backend/templates/resalloc/osuosl-vm.j2
Executable file
|
@ -0,0 +1,23 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
export ANSIBLE_HOST_KEY_CHECKING=False
|
||||||
|
|
||||||
|
. "{{ provision_directory }}/.rc-osuosl.sh"
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
test -n "$RESALLOC_NAME"
|
||||||
|
|
||||||
|
flavor=db5a95e1-5bf6-4bb4-9489-70362d936cd1 # name: 'fedora.copr'
|
||||||
|
network=a5bd5b53-1dc4-423c-a854-aa1cc9ee5456 # name: 'public'
|
||||||
|
playbook="{{ provision_directory }}/libvirt-provision.yml"
|
||||||
|
|
||||||
|
resalloc-openstack-new \
|
||||||
|
--image "{{ copr_builder_images.osuosl.ppc64le }}" \
|
||||||
|
--flavor "$flavor" \
|
||||||
|
--name "$RESALLOC_NAME" \
|
||||||
|
--post-command "set -x ; ansible-playbook $playbook -i \"\$RESALLOC_OS_IP,\" >&2 " \
|
||||||
|
--key-pair-id copr-builder \
|
||||||
|
--alloc-volume 32 \
|
||||||
|
--nic net-id="$network" \
|
||||||
|
--print-ip
|
|
@ -33,7 +33,7 @@ aws_x86_64_{% if spot %}spot{% else %}normal{% endif %}_{% if devel %}dev{% else
|
||||||
{% else %}
|
{% else %}
|
||||||
cmd_new: copr-resalloc-aws-new-x86_64
|
cmd_new: copr-resalloc-aws-new-x86_64
|
||||||
{% endif %}
|
{% endif %}
|
||||||
cmd_delete: "/var/lib/resallocserver/provision/vm-delete"
|
cmd_delete: "/var/lib/resallocserver/resalloc_provision/vm-delete"
|
||||||
cmd_livecheck: "resalloc-check-vm-ip"
|
cmd_livecheck: "resalloc-check-vm-ip"
|
||||||
cmd_release: "/var/lib/resallocserver/resalloc_provision/vm-release"
|
cmd_release: "/var/lib/resallocserver/resalloc_provision/vm-release"
|
||||||
livecheck_period: 180
|
livecheck_period: 180
|
||||||
|
@ -57,7 +57,7 @@ aws_aarch64_{% if spot %}spot{% else %}normal{% endif %}_{% if devel %}dev{% els
|
||||||
{% else %}
|
{% else %}
|
||||||
cmd_new: copr-resalloc-aws-new-aarch64
|
cmd_new: copr-resalloc-aws-new-aarch64
|
||||||
{% endif %}
|
{% endif %}
|
||||||
cmd_delete: "/var/lib/resallocserver/provision/vm-delete"
|
cmd_delete: "/var/lib/resallocserver/resalloc_provision/vm-delete"
|
||||||
cmd_livecheck: "resalloc-check-vm-ip"
|
cmd_livecheck: "resalloc-check-vm-ip"
|
||||||
cmd_release: "/var/lib/resallocserver/resalloc_provision/vm-release"
|
cmd_release: "/var/lib/resallocserver/resalloc_provision/vm-release"
|
||||||
livecheck_period: 180
|
livecheck_period: 180
|
||||||
|
@ -96,7 +96,7 @@ copr_hv_x86_64_{{ hv }}_{% if devel %}dev{% else %}prod{% endif %}:
|
||||||
- hypervisor_x86_64
|
- hypervisor_x86_64
|
||||||
- hypervisor_x86_64_{{ hv }}
|
- hypervisor_x86_64_{{ hv }}
|
||||||
cmd_new: "/var/lib/resallocserver/provision/libvirt-new --swap-vol-size 168"
|
cmd_new: "/var/lib/resallocserver/provision/libvirt-new --swap-vol-size 168"
|
||||||
cmd_delete: "/var/lib/resallocserver/provision/vm-delete"
|
cmd_delete: "/var/lib/resallocserver/resalloc_provision/vm-delete"
|
||||||
cmd_livecheck: "resalloc-check-vm-ip"
|
cmd_livecheck: "resalloc-check-vm-ip"
|
||||||
cmd_release: "/var/lib/resallocserver/resalloc_provision/vm-release"
|
cmd_release: "/var/lib/resallocserver/resalloc_provision/vm-release"
|
||||||
livecheck_period: 180
|
livecheck_period: 180
|
||||||
|
@ -128,7 +128,7 @@ copr_hv_ppc64le_{{ hv }}_{% if devel %}dev{% else %}prod{% endif %}:
|
||||||
- hypervisor_ppc64le
|
- hypervisor_ppc64le
|
||||||
- hypervisor_ppc64le_{{ hv }}
|
- hypervisor_ppc64le_{{ hv }}
|
||||||
cmd_new: "/var/lib/resallocserver/provision/libvirt-new --swap-vol-size 168"
|
cmd_new: "/var/lib/resallocserver/provision/libvirt-new --swap-vol-size 168"
|
||||||
cmd_delete: "/var/lib/resallocserver/provision/vm-delete"
|
cmd_delete: "/var/lib/resallocserver/resalloc_provision/vm-delete"
|
||||||
cmd_livecheck: "resalloc-check-vm-ip"
|
cmd_livecheck: "resalloc-check-vm-ip"
|
||||||
cmd_release: "/var/lib/resallocserver/resalloc_provision/vm-release"
|
cmd_release: "/var/lib/resallocserver/resalloc_provision/vm-release"
|
||||||
livecheck_period: 180
|
livecheck_period: 180
|
||||||
|
@ -154,7 +154,7 @@ copr_ibm_cloud_s390x_tokyo_{% if devel %}dev{% else %}prod{% endif %}:
|
||||||
- ibm_cloud
|
- ibm_cloud
|
||||||
- tokyo
|
- tokyo
|
||||||
cmd_new: '/var/lib/resallocserver/resalloc_provision/ibm-cloud-vm --log-level debug create "$RESALLOC_NAME"'
|
cmd_new: '/var/lib/resallocserver/resalloc_provision/ibm-cloud-vm --log-level debug create "$RESALLOC_NAME"'
|
||||||
cmd_delete: "/var/lib/resallocserver/provision/vm-delete"
|
cmd_delete: "/var/lib/resallocserver/resalloc_provision/vm-delete"
|
||||||
cmd_livecheck: "resalloc-check-vm-ip"
|
cmd_livecheck: "resalloc-check-vm-ip"
|
||||||
cmd_release: "/var/lib/resallocserver/resalloc_provision/vm-release"
|
cmd_release: "/var/lib/resallocserver/resalloc_provision/vm-release"
|
||||||
livecheck_period: 180
|
livecheck_period: 180
|
||||||
|
@ -163,6 +163,25 @@ copr_ibm_cloud_s390x_tokyo_{% if devel %}dev{% else %}prod{% endif %}:
|
||||||
reuse_max_time: 1800
|
reuse_max_time: 1800
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if devel %}
|
||||||
|
# Power9 VMs in openpower-controller.osuosl.org
|
||||||
|
copr_osuosl_p09_{% if devel %}dev{% else %}prod{% endif %}:
|
||||||
|
max: 3
|
||||||
|
max_prealloc: 1
|
||||||
|
max_starting: 1
|
||||||
|
tags:
|
||||||
|
- none_currently_just_experimenting
|
||||||
|
cmd_new: '/var/lib/resallocserver/resalloc_provision/osuosl-vm'
|
||||||
|
cmd_delete: "/var/lib/resallocserver/resalloc_provision/vm-delete"
|
||||||
|
cmd_livecheck: "resalloc-check-vm-ip"
|
||||||
|
cmd_release: "/var/lib/resallocserver/resalloc_provision/vm-release"
|
||||||
|
livecheck_period: 180
|
||||||
|
reuse_opportunity_time: 180
|
||||||
|
reuse_max_count: 8
|
||||||
|
reuse_max_time: 1800
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{{ aws_x86_64(builders.aws.x86_64[0], builders.aws.x86_64[1],
|
{{ aws_x86_64(builders.aws.x86_64[0], builders.aws.x86_64[1],
|
||||||
builders.aws.x86_64[2])
|
builders.aws.x86_64[2])
|
||||||
|
|
|
@ -14,6 +14,12 @@ case "$RESALLOC_POOL_ID" in
|
||||||
exec /usr/bin/resalloc-aws-delete --aws-profile default
|
exec /usr/bin/resalloc-aws-delete --aws-profile default
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
copr_osuosl_p09_*)
|
||||||
|
# Delegate the rest of this task to an OpenStack specific script.
|
||||||
|
. "{{ provision_directory }}/.rc-osuosl.sh"
|
||||||
|
resalloc-openstack-delete --delete-everything "$RESALLOC_NAME"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
*s390x*)
|
*s390x*)
|
||||||
# Delegate the rest of the task to the IBM Cloud specific script.
|
# Delegate the rest of the task to the IBM Cloud specific script.
|
||||||
exec /var/lib/resallocserver/resalloc_provision/ibm-cloud-vm --log-level debug delete "$RESALLOC_NAME"
|
exec /var/lib/resallocserver/resalloc_provision/ibm-cloud-vm --log-level debug delete "$RESALLOC_NAME"
|
|
@ -182,4 +182,5 @@
|
||||||
include_tasks: "{{ roles_path }}/copr/backend/tasks/setup_provisioning_environment.yml"
|
include_tasks: "{{ roles_path }}/copr/backend/tasks/setup_provisioning_environment.yml"
|
||||||
vars:
|
vars:
|
||||||
provision_directory: /home/copr/provision
|
provision_directory: /home/copr/provision
|
||||||
|
provision_user: copr
|
||||||
tags: always
|
tags: always
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue