ansible/test/integration/targets/azure_rm_acs/tasks/main.yml
Julien Stroheker fe1153c0af Azure acs module (azure_rm_acs.py) (#28522)
* Adding acs module

* linter issue

* Reduce the VM Size for the int. tests

* Short the name of the cluster

* Fixing the asserts and title

* Fixing VM Scale count in int. tests

* Changing the location of the tests

* trying eastus2

* disabling acs CI tests until stabilized
2017-08-29 17:59:38 -07:00

143 lines
No EOL
6.8 KiB
YAML

- name: Create an ACS instance - DCOS
azure_rm_acs:
name: "acsdcos{{ resource_group | hash('md5') | truncate(7, True, '') }}"
resource_group: "{{ resource_group }}"
location: eastus2
orchestration_platform: DCOS
master_profile:
- count: 1
dns_prefix: "acsdcos{{ resource_group | hash('md5') | truncate(10, True, '') }}"
linux_profile:
- admin_username: azureuser
ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqaZoyiz1qbdOQ8xEf6uEu1cCwYowo5FHtsBhqLoDnnp7KUTEBN+io238wdhjkasndq238e2/983289dasjnasey823/YkUCuzxDpsH7DUDhZcwySLKVVe0Qm3+928dfsjsejk298r/+vAnflKebuypNlmocIvakFWoZda18FOmsOoIVXQ8HWFNCuw9ZCunMSN62QGamCe3dL5cXlkgHYv7ekJE15IA9aOJcM7e90oeTqo+dsajda82e78sdja/llas8tsXY85LFqRnr3gJ02bAscjc477+X+j/gkpFoN1QEmt juliens@msft.com
agent_pool_profiles:
- name: default
count: 1
dns_prefix: "acsdcos{{ resource_group | hash('md5') | truncate(12, True, '') }}"
vm_size: Standard_A0
diagnostics_profile: false
register: output
- name: Assert the ACS instance is well created
assert:
that:
- output.changed
- output.state.provisioning_state == 'Succeeded'
- name: Scale the ACS instance from 1 to 2 - DCOS
azure_rm_acs:
name: "acsdcos{{ resource_group | hash('md5') | truncate(7, True, '') }}"
resource_group: "{{ resource_group }}"
location: eastus2
orchestration_platform: DCOS
master_profile:
- count: 1
dns_prefix: "acsdcos{{ resource_group | hash('md5') | truncate(10, True, '') }}"
linux_profile:
- admin_username: azureuser
ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqaZoyiz1qbdOQ8xEf6uEu1cCwYowo5FHtsBhqLoDnnp7KUTEBN+io238wdhjkasndq238e2/983289dasjnasey823/YkUCuzxDpsH7DUDhZcwySLKVVe0Qm3+928dfsjsejk298r/+vAnflKebuypNlmocIvakFWoZda18FOmsOoIVXQ8HWFNCuw9ZCunMSN62QGamCe3dL5cXlkgHYv7ekJE15IA9aOJcM7e90oeTqo+dsajda82e78sdja/llas8tsXY85LFqRnr3gJ02bAscjc477+X+j/gkpFoN1QEmt juliens@msft.com
agent_pool_profiles:
- name: default
count: 2
dns_prefix: "acsdcos{{ resource_group | hash('md5') | truncate(12, True, '') }}"
vm_size: Standard_A0
diagnostics_profile: false
register: output
- name: Assert the ACS instance is well scaled
assert:
that:
- output.changed
- output.state.agent_pool_profiles[0].count == 2
- name: Delete the DCOS ACS instance - DCOS
azure_rm_acs:
name: "acsdcos{{ resource_group | hash('md5') | truncate(7, True, '') }}"
resource_group: "{{ resource_group }}"
location: eastus2
orchestration_platform: DCOS
state: absent
master_profile:
- count: 1
dns_prefix: "acsdcos{{ resource_group | hash('md5') | truncate(10, True, '') }}"
linux_profile:
- admin_username: azureuser
ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqaZoyiz1qbdOQ8xEf6uEu1cCwYowo5FHtsBhqLoDnnp7KUTEBN+io238wdhjkasndq238e2/983289dasjnasey823/YkUCuzxDpsH7DUDhZcwySLKVVe0Qm3+928dfsjsejk298r/+vAnflKebuypNlmocIvakFWoZda18FOmsOoIVXQ8HWFNCuw9ZCunMSN62QGamCe3dL5cXlkgHYv7ekJE15IA9aOJcM7e90oeTqo+dsajda82e78sdja/llas8tsXY85LFqRnr3gJ02bAscjc477+X+j/gkpFoN1QEmt juliens@msft.com
agent_pool_profiles:
- name: default
count: 2
dns_prefix: "acsdcos{{ resource_group | hash('md5') | truncate(12, True, '') }}"
vm_size: Standard_A0
diagnostics_profile: false
- name: Create an ACS instance - Swarm
azure_rm_acs:
name: "acssw{{ resource_group | hash('md5') | truncate(7, True, '') }}"
resource_group: "{{ resource_group }}"
location: eastus2
orchestration_platform: Swarm
master_profile:
- count: 1
dns_prefix: "acssw{{ resource_group | hash('md5') | truncate(10, True, '') }}"
linux_profile:
- admin_username: azureuser
ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqaZoyiz1qbdOQ8xEf6uEu1cCwYowo5FHtsBhqLoDnnp7KUTEBN+io238wdhjkasndq238e2/983289dasjnasey823/YkUCuzxDpsH7DUDhZcwySLKVVe0Qm3+928dfsjsejk298r/+vAnflKebuypNlmocIvakFWoZda18FOmsOoIVXQ8HWFNCuw9ZCunMSN62QGamCe3dL5cXlkgHYv7ekJE15IA9aOJcM7e90oeTqo+dsajda82e78sdja/llas8tsXY85LFqRnr3gJ02bAscjc477+X+j/gkpFoN1QEmt juliens@msft.com
agent_pool_profiles:
- name: default
count: 1
dns_prefix: "acssw{{ resource_group | hash('md5') | truncate(12, True, '') }}"
vm_size: Standard_A0
diagnostics_profile: false
register: output
- name: Assert the ACS instance is well created
assert:
that:
- output.changed
- output.state.provisioning_state == 'Succeeded'
- name: Scale the ACS instance from 1 to 2 - Swarm
azure_rm_acs:
name: "acssw{{ resource_group | hash('md5') | truncate(7, True, '') }}"
resource_group: "{{ resource_group }}"
location: eastus2
orchestration_platform: Swarm
master_profile:
- count: 1
dns_prefix: "acssw{{ resource_group | hash('md5') | truncate(10, True, '') }}"
linux_profile:
- admin_username: azureuser
ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqaZoyiz1qbdOQ8xEf6uEu1cCwYowo5FHtsBhqLoDnnp7KUTEBN+io238wdhjkasndq238e2/983289dasjnasey823/YkUCuzxDpsH7DUDhZcwySLKVVe0Qm3+928dfsjsejk298r/+vAnflKebuypNlmocIvakFWoZda18FOmsOoIVXQ8HWFNCuw9ZCunMSN62QGamCe3dL5cXlkgHYv7ekJE15IA9aOJcM7e90oeTqo+dsajda82e78sdja/llas8tsXY85LFqRnr3gJ02bAscjc477+X+j/gkpFoN1QEmt juliens@msft.com
agent_pool_profiles:
- name: default
count: 2
dns_prefix: "acssw{{ resource_group | hash('md5') | truncate(12, True, '') }}"
vm_size: Standard_A0
diagnostics_profile: false
register: output
- name: Assert the ACS instance is well scaled
assert:
that:
- output.changed
- output.state.agent_pool_profiles[0].count == 2
- name: Delete the ACS instance - Swarm
azure_rm_acs:
name: "acssw{{ resource_group | hash('md5') | truncate(7, True, '') }}"
resource_group: "{{ resource_group }}"
location: eastus2
orchestration_platform: Swarm
state: absent
master_profile:
- count: 1
dns_prefix: "acssw{{ resource_group | hash('md5') | truncate(10, True, '') }}"
linux_profile:
- admin_username: azureuser
ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqaZoyiz1qbdOQ8xEf6uEu1cCwYowo5FHtsBhqLoDnnp7KUTEBN+io238wdhjkasndq238e2/983289dasjnasey823/YkUCuzxDpsH7DUDhZcwySLKVVe0Qm3+928dfsjsejk298r/+vAnflKebuypNlmocIvakFWoZda18FOmsOoIVXQ8HWFNCuw9ZCunMSN62QGamCe3dL5cXlkgHYv7ekJE15IA9aOJcM7e90oeTqo+dsajda82e78sdja/llas8tsXY85LFqRnr3gJ02bAscjc477+X+j/gkpFoN1QEmt juliens@msft.com
agent_pool_profiles:
- name: default
count: 2
dns_prefix: "acssw{{ resource_group | hash('md5') | truncate(12, True, '') }}"
vm_size: Standard_A0
diagnostics_profile: false