Merge "Switch to using openstackclient"

This commit is contained in:
Zuul 2022-04-28 08:48:12 +00:00 committed by Gerrit Code Review
commit 6b5d5b235d

View File

@ -16,32 +16,28 @@
args:
executable: /bin/bash
shell: |
source /opt/devstack/openrc admin admin
nova flavor-create nodepool-512 64 512 5 1
nova flavor-create nodepool-1024 128 1024 5 1
openstack --os-cloud=devstack-admin flavor create --ram=512 --disk=5 --vcpus=1 --id=64 nodepool-512
openstack --os-cloud=devstack-admin flavor create --ram=1024 --disk=5 --vcpus=1 --id=128 nodepool-1024
- name: Create security groups
args:
executable: /bin/bash
shell: |
source /opt/devstack/openrc admin admin
openstack --os-project-name demo --os-username demo security group rule create --ingress --protocol tcp --dst-port 1:65535 --remote-ip 0.0.0.0/0 default
openstack --os-project-name demo --os-username demo security group rule create --ingress --protocol udp --dst-port 1:65535 --remote-ip 0.0.0.0/0 default
openstack --os-cloud=devstack security group rule create --ingress --protocol tcp --dst-port 1:65535 --remote-ip 0.0.0.0/0 default
openstack --os-cloud=devstack security group rule create --ingress --protocol udp --dst-port 1:65535 --remote-ip 0.0.0.0/0 default
- name: Create unmanaged VM
args:
executable: /bin/bash
shell: |
source /opt/devstack/openrc admin admin
openstack network list
cirros_image=$(openstack --os-project-name demo --os-username demo image list | grep cirros | awk '{print $4}' | head -n1)
openstack --os-project-name demo --os-username demo server create --flavor cirros256 --image $cirros_image unmanaged-vm --network public
openstack --os-cloud=devstack-admin network list
cirros_image=$(openstack --os-cloud=devstack image list -f value -c Name | grep cirros | head -n1)
openstack --os-cloud=devstack server create --flavor=cirros256 --image="$cirros_image" --network=public unmanaged-vm
- name: Create nodepool SSH keypair
args:
executable: /bin/bash
shell: |
source /opt/devstack/openrc admin admin
ssh-keygen -f {{ NODEPOOL_KEY }} -P ""
nova --os-project-name demo --os-username demo keypair-add --pub-key {{ NODEPOOL_PUBKEY }} {{ NODEPOOL_KEY_NAME }}
openstack --os-cloud=devstack keypair create --public-key="{{ NODEPOOL_PUBKEY }}" "{{ NODEPOOL_KEY_NAME }}"
- name: Write nodepool elements
args: