mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-22 20:13:59 -07:00
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
This commit is contained in:
parent
99b7cb2068
commit
fe1153c0af
6 changed files with 880 additions and 0 deletions
2
test/integration/targets/azure_rm_acs/aliases
Normal file
2
test/integration/targets/azure_rm_acs/aliases
Normal file
|
@ -0,0 +1,2 @@
|
|||
cloud/azure
|
||||
destructive
|
2
test/integration/targets/azure_rm_acs/meta/main.yml
Normal file
2
test/integration/targets/azure_rm_acs/meta/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
dependencies:
|
||||
- setup_azure
|
143
test/integration/targets/azure_rm_acs/tasks/main.yml
Normal file
143
test/integration/targets/azure_rm_acs/tasks/main.yml
Normal file
|
@ -0,0 +1,143 @@
|
|||
- 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
|
Loading…
Add table
Add a link
Reference in a new issue