Skip to content

Commit a40845e

Browse files
committed
This is a combination of 5 commits.
1 parent ceabfe2 commit a40845e

File tree

9 files changed

+83
-30
lines changed

9 files changed

+83
-30
lines changed

ansible/ansible.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ host_key_checking = False
55
pipelining = True
66
forks = 30
77
deprecation_warnings=False
8-
inventory = inventory.yml
8+
#inventory = inventory.yml
99
roles_path = ../roles
1010

1111

ansible/vars/defaults.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
src_directory: "{{ ansible_env.HOME }}/src"
33

44
kayobe_config_repo: https://github.com/stackhpc/stackhpc-kayobe-config.git
5-
kayobe_config_version: stackhpc/yoga
5+
kayobe_config_version: Azimuth-MN-Workaround #stackhpc/yoga
66
kayobe_config_name: kayobe-config
77
kayobe_config_environment: ci-multinode
88

@@ -17,7 +17,7 @@ openstack_config_name: openstack-config
1717
vault_password_path: "~/vault.password"
1818

1919
ssh_key_path: "{{ cluster_ssh_private_key_file }}"
20-
ansible_user: 'ubuntu'
20+
2121
#vxlan_vni:
2222

2323
root_domain: sms-lab.cloud

group_vars/openstack.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ terraform_project_path: "{{ playbook_dir }}"
2424
terraform_state: "{{ cluster_state | default('present') }}"
2525

2626
# The user that should be used to SSH to the cluster hosts
27-
cluster_ssh_user: ubuntu
28-
ssh_user: ubuntu
27+
cluster_ssh_user: cloud-user
28+
ssh_user: cloud-user
2929

3030
tf_files: []
3131
#- outputs.tf

multinode-app.yml

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
src: "{{ playbook_dir }}/templates/userdata.cfg.tpl.j2"
1717
dest: "{{ playbook_dir }}/templates/userdata.cfg.tpl"
1818

19-
2019
# Provision the infrastructure
2120
# The CaaS puts hosts for accessing the OpenStack API into the 'openstack' group
2221
- hosts: openstack
@@ -25,6 +24,15 @@
2524

2625
- hosts: localhost
2726
tasks:
27+
# Check whether an ans_vlt_pwd variable is defined and if so, save it into a file called '~/vault.password'. If it doesn't exist, create a the '~/vault.password' file with ans_vlt_pwd = "password_not_set" as the password.
28+
- name: Create vault password file
29+
vars:
30+
ans_dflt: 'default_password'
31+
ansible.builtin.copy:
32+
content: "{{ ans_vlt_pwd | default( ans_dflt , true ) }}"
33+
dest: "~/vault.password"
34+
mode: 0600
35+
2836
# - block:
2937
# # Install the ansible requirements
3038
# - name: Install ansible posix
@@ -51,17 +59,30 @@
5159
# outputs:
5260
# cluster_access_ip: "{{ hostvars[groups['openstack'][0]].cluster_gateway_ip }}"
5361

54-
- name: Debug groups
55-
debug:
56-
msg: "{{ groups | to_yaml }}"
62+
# - name: Debug groups
63+
# debug:
64+
# msg: "{{ groups | to_yaml }}"
5765
# when: cluster_state != "absent"
5866

5967
# Import the playbook to start configuring the multi-node hosts.
6068
- name: Configure hosts and deploy ansible
6169
import_playbook: ansible/configure-hosts.yml
6270

6371

64-
# - hosts: multinode_ansible_control
72+
- hosts: ansible_control
73+
vars:
74+
ansible_pipelining: true
75+
ansible_ssh_pipelining: true
76+
tasks:
77+
- name: Deploy OpenStack.
78+
ansible.builtin.command:
79+
cmd: "bash ~/deploy-openstack.sh"
80+
81+
# - hosts: ansible_control
82+
# vars:
83+
# ansible_pipelining: true
84+
# ansible_ssh_pipelining: true
6585
# tasks:
66-
# - name: Test hostname
67-
# command: hostname
86+
# - name: Deploy OpenStack.
87+
# ansible.builtin.shell:
88+
# cmd: "./deploy-openstack.sh"

requirements.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ collections:
44
type: git
55
version: 8c7acce4538aab8c0e928972155a2ccb5cb1b2a1
66
- name: cloud.terraform
7+
- name: ansible.posix
78
roles:
89
- src: mrlesmithjr.manage_lvm

roles/cluster_infra/templates/terraform.tfvars.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ seed_vm_flavor = "general.v1.small"
88
seed_disk_size = 100
99

1010
multinode_flavor = "general.v1.medium"
11-
multinode_image = "Ubuntu-22.04-lvm"
11+
multinode_image = "rocky9-lvm"
1212
multinode_keypair = "MaxMNKP"
1313
multinode_vm_network = "stackhpc-ipv4-geneve"
1414
multinode_vm_subnet = "stackhpc-ipv4-geneve-subnet"

terraform.tfvars.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ seed_vm_flavor = "general.v1.small"
88
seed_disk_size = 100
99

1010
multinode_flavor = "general.v1.medium"
11-
multinode_image = "Ubuntu-22.04-lvm"
11+
multinode_image = "rocky9-lvm"
1212
multinode_keypair = "MaxMNKP"
1313
multinode_vm_network = "stackhpc-ipv4-geneve"
1414
multinode_vm_subnet = "stackhpc-ipv4-geneve-subnet"
@@ -18,7 +18,7 @@ compute_disk_size = 100
1818
controller_disk_size = 100
1919

2020
ssh_public_key = "{{ cluster_user_ssh_public_key }}"
21-
ssh_user = "ubuntu"
21+
ssh_user = "cloud-user"
2222

2323
storage_count = "3"
2424
storage_flavor = "general.v1.small"

ui-meta/multinode-appliance.yml

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ logo: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACAAAAAgACAYAAACyp9MwAAAAAXNS
1111

1212

1313
# A list of parameters to be gathered from the user
14-
parameters:
14+
# parameters:
1515
# The name of the Ansible variable that will be populated with the parameter value.
1616
# This field is required.
17-
- name: vxlan_vni
17+
# - name: vxlan_vni
1818
# A human-readable name for the parameter. Defaults to the name if not given.
19-
label: Set the VXLAN VNI value.
19+
# label: Set the VXLAN VNI value.
2020
# An optional short description for the parameter.
21-
description: Please provide a VXLAN VNI. A unique value from 1 to 100,000.
21+
# description: Please provide a VXLAN VNI. A unique value from 1 to 100,000.
2222
# The kind of the parameter. This field is required.
2323
# Valid values are:
2424
#  list
@@ -44,14 +44,14 @@ parameters:
4444
#  The ID of a volume in the target tenancy.
4545
#  cloud.cluster
4646
#  The ID of another cluster in the target tenancy.
47-
kind: "integer"
47+
# kind: "integer"
4848
# Indicates whether the parameter is required. Defaults to true if not given.
49-
required: true
49+
# required: true
5050
# The default value value for the parameter. Defaults to null if not given, indicating no default.
51-
default: null
51+
# default: null
5252
# Indicates whether the parameter is immutable, i.e. cannot be changed after the initial creation.
5353
# Defaults to false if not given.
54-
immutable: true
54+
# immutable: true
5555
# Additional options for the parameter. The valid options depend on the kind of the parameter.
5656
# list
5757
# min_length: An optional minimum length for the list.
@@ -63,9 +63,9 @@ parameters:
6363
#  pattern: An optional regular expression pattern to validate the string against.
6464
#  integer
6565
#  number
66-
options:
67-
min: 1
68-
max: 100000
66+
# options:
67+
# min: 1
68+
# max: 100000
6969
#  boolean
7070
# permanent: If true, indicates that the parameter cannot become false again once it has
7171
#  been set to true. Defaults to false if not given.
@@ -82,6 +82,37 @@ parameters:
8282
# options:
8383
# min_ram: 1024
8484
# min_disk: 10
85+
# secret: true
86+
# confirm: true
87+
88+
# A list of parameters to be gathered from the user
89+
parameters:
90+
- name: vxlan_vni
91+
label: Set the VXLAN VNI value.
92+
description: Please provide a VXLAN VNI. A unique value from 1 to 100,000.
93+
kind: "integer"
94+
required: true
95+
default: null
96+
immutable: true
97+
options:
98+
min: 1
99+
max: 100000
100+
101+
102+
- name: ans_vlt_pwd
103+
# A human-readable name for the parameter. Defaults to the name if not given.
104+
label: Provide the Ansible Vault password.
105+
# An optional short description for the parameter.
106+
description: Please provide the Ansible Vault password to enable the deployment of the cluster.
107+
kind: "string"
108+
required: false
109+
#default: "password_not_set"
110+
immutable: false
111+
# Replace the characters of the parameter with asterisks in the UI.
112+
options:
113+
secret: true
114+
confirm: true
115+
#private: true
85116

86117
#- name: backend_count
87118
# label: Backend node count

versions.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ terraform {
55
source = "terraform-provider-openstack/openstack"
66
version = "1.49.0"
77
}
8-
ansible = {
9-
source = "ansible/ansible"
10-
version = "1.1.0"
11-
}
8+
#ansible = {
9+
# source = "ansible/ansible"
10+
# version = "1.1.0"
11+
#}
1212
}
1313
}

0 commit comments

Comments
 (0)