diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c6f3e6bf1014df5c9a418e5f6a984155524272f5..ae5a87f18556fcb6bb7e933e75148824c3a1df28 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,6 @@ variables: GIT_SUBMODULE_STRATEGY: recursive - STACKNAME: CICD-${CI_PROJECT_NAME}-$CI_COMMIT_REF_NAME + STACKNAME: CICD-${CI_PROJECT_NAME}-gitlabci #-$CI_COMMIT_REF_NAME NECTAR_ALLOCATION: HPCCICD ANSIBLE_HOST_KEY_CHECKING: "False" DEFAULT_PATH: "CICD" @@ -131,7 +131,7 @@ build_cluster_cicd: - source ./$NECTAR_ALLOCATION-openrc.sh - openstack stack list - bash -x ./heat/heatcicdwrapper.sh create_or_update $STACKNAME - - bash -x ./heat/server_rebuild.sh all + #- bash -x ./heat/server_rebuild.sh all after_script: - sleep 30 # artifically wait a bit to give the nodes time to boot # only: @@ -153,7 +153,7 @@ ansible_create_cluster_stage: - echo "ansible_create_cluster_stage" - bash -x ./CICD/ansible_create_cluster_script.sh - cd CICD - - ansible-playbook -i files/inventory.$STACKNAME --key-file ../gc_key.pem --skip-tags SiteSpecific master_playbook.yml + - ansible-playbook -i files/inventory.$STACKNAME --key-file ../gc_key.pem --skip-tags SiteSpecific,mockldap,ldapclient master_playbook.yml - sleep 15 - echo uglyuglyfix - ansible -i files/inventory.$STACKNAME --key-file ../gc_key.pem -b -a "systemctl restart slurmdbd" ManagementNodes diff --git a/CICD/files/gres.conf b/CICD/files/gres.conf new file mode 100644 index 0000000000000000000000000000000000000000..dc8448acc87fe6af03f6b9e4b679dc2716fa148b --- /dev/null +++ b/CICD/files/gres.conf @@ -0,0 +1,4 @@ +#consolidated GRES configuration file + +# example entry: +#NodeName=m3f0[00-31] Name=gpu Type=K1 File=/dev/nvidia0 CPUs=0-2 diff --git a/CICD/heat/gc_HOT.yaml b/CICD/heat/gc_HOT.yaml index ec8a6151a4759f3fe1106a42857e5df8c73ecc68..edca168bacf6e6123676f11aee6860955b6dfc09 100644 --- a/CICD/heat/gc_HOT.yaml +++ b/CICD/heat/gc_HOT.yaml @@ -8,7 +8,7 @@ parameters: type: string label: Image ID description: Ubuntu Image - default: f8b79936-6616-4a22-b55d-0d0a1d27bceb + default: 8faa45cc-2c97-40db-a12d-648c303cd567 centos_7_image_id: type: string label: Image ID @@ -66,10 +66,8 @@ parameters: label: Resource ID default: 1de45b93-e5f6-4838-94f7-fc307752d6cb - resources: - SQLNode0: type: "OS::Nova::Server" properties: @@ -77,12 +75,12 @@ resources: list_join: [ '-', [ { get_param: "OS::stack_name" }, 'sql0' ]] availability_zone: { get_param: avz } flavor: m3.xsmall - image: { get_param: centos_7_image_id } + image: { get_param: ubuntu_2004_image_id } key_name: { get_param: ssh_key } security_groups: [ { get_param: SSHMonashSecGroupID }, { get_param: SlurmSecGroupID }, { get_param: MySQLSecGroupID }, { get_param: NFSSecGroupID }, { get_param: LDAPSecGroupID }, { get_param: SYSLOGSecGroupID } ] metadata: ansible_host_groups: [ SQLNodes, NFSNodes, LDAPServer, CentosNodes, LogNodes ] - ansible_ssh_user: ec2-user + ansible_ssh_user: ubuntu project_name: { get_param: project_name } networks: - network: { get_param: NetID } @@ -126,7 +124,7 @@ resources: MgmtNodesCentos7: type: "OS::Heat::ResourceGroup" properties: - count: 1 + count: 0 resource_def: type: My::Server::MgmtNode properties: @@ -143,7 +141,7 @@ resources: MgmtNodesU: type: "OS::Heat::ResourceGroup" properties: - count: 1 + count: 2 resource_def: type: My::Server::MgmtNode properties: @@ -160,7 +158,7 @@ resources: LoginNodesC: type: "OS::Heat::ResourceGroup" properties: - count: 1 + count: 0 resource_def: type: "OS::Nova::Server" properties: @@ -223,7 +221,7 @@ resources: ComputeNodesU: type: "OS::Heat::ResourceGroup" properties: - count: 0 + count: 1 resource_def: type: "OS::Nova::Server" properties: @@ -244,7 +242,7 @@ resources: ComputeNodesCentos7: type: "OS::Heat::ResourceGroup" properties: - count: 1 + count: 0 resource_def: type: "OS::Nova::Server" properties: diff --git a/roles/ldapservertest/tasks/main.yml b/roles/ldapservertest/tasks/main.yml index b5cb3a3735b74259caaea30b5d943f9b7c7fa0ab..c99a27e5481e3e6e4017d565c804d44b2a937185 100644 --- a/roles/ldapservertest/tasks/main.yml +++ b/roles/ldapservertest/tasks/main.yml @@ -19,8 +19,19 @@ - compat-openldap - openldap-clients - openldap-servers - - openldap-devel become: true + when: ansible_os_family == 'RedHat' + + - name: Install OpenLDAP packages and necessary packages + package: + name: "{{item}}" + state: present + with_items: + - slapd + - ldap-utils + - openssl + become: true + when: ansible_os_family == 'Debian' - name: Stop OpenLDAP Server systemd: diff --git a/roles/mysql/tasks/Ubuntu_18_mysql_server.yml b/roles/mysql/tasks/Ubuntu_18_mysql_server.yml index ca39b70331abbe55a35b8c9439db7eb01fbb83bd..33b47af177da62b25a664a85a1bbe5f02fd5daae 100644 --- a/roles/mysql/tasks/Ubuntu_18_mysql_server.yml +++ b/roles/mysql/tasks/Ubuntu_18_mysql_server.yml @@ -33,7 +33,13 @@ - name: update mysql root password for all root accounts mysql_user: name=root host=localhost password={{ mysql_root_password }} login_user=root check_implicit_admin=yes become: true - become_user: root + register: mysql_setrootpw + ignore_errors: yes + +- name: update mysql root password for all root accounts + mysql_user: name=root host=localhost password={{ mysql_root_password }} login_user=root check_implicit_admin=yes login_password={{ mysql_root_password }} + become: true + when: mysql_setrootpw.failed - name: "Adding user database" mysql_db: name={{ mysql_user_db_name }} state=present login_user=root login_password={{ mysql_root_password }} diff --git a/roles/mysql/vars/Ubuntu_20.yml b/roles/mysql/vars/Ubuntu_20.yml index b999bb9acc9b27479c9f0a1421d74a5ccbfe370e..26aabeb9dda2463930a2b26fb8c9bcdf1307eab5 100644 --- a/roles/mysql/vars/Ubuntu_20.yml +++ b/roles/mysql/vars/Ubuntu_20.yml @@ -12,7 +12,6 @@ server_packages: client_packages: - python3 - python3-pymysql - - python - mariadb-client sqlServiceName: "mariadb" diff --git a/roles/rsyslog_server/tasks/main.yml b/roles/rsyslog_server/tasks/main.yml index 14de5a43fa48dab35f8808e355db0cdc9dc054c5..e1f787ef2e078e8507a88084081defa1c281e6fc 100644 --- a/roles/rsyslog_server/tasks/main.yml +++ b/roles/rsyslog_server/tasks/main.yml @@ -1,25 +1,16 @@ --- - -- name: install rsyslog - yum: name=rsyslog state=present - become: true - become_user: root - when: ansible_os_family == 'RedHat' - - name: install rsyslog - yum: name=rsyslog state=present + package: + name: rsyslog + state: present become: true - become_user: root - when: ansible_os_family == 'Debian' - name: install rsyslogd.conf template: src=rsyslog.conf.j2 dest=/etc/rsyslog.conf owner=root group=root mode=644 become: true - become_user: root register: config_changed - name: restart rsyslog service: name=rsyslog state=restarted become: true - become_user: root when: config_changed.changed diff --git a/roles/slurm-common/templates/slurmlog.j2 b/roles/slurm-common/templates/slurmlog.j2 index 23def102f2253a0a00f69f5ef04f5b17f0851186..a6cc3d916285a9a1cdd400915941f4b521125af3 100644 --- a/roles/slurm-common/templates/slurmlog.j2 +++ b/roles/slurm-common/templates/slurmlog.j2 @@ -1,4 +1,4 @@ -{% if hostgroup == 'ManagementNodes' %} +{% if inventory_hostname in groups.ManagementNodes %} {{ slurmctlddebug.log }} {% else %} {{ slurmddebug.log }} @@ -18,7 +18,7 @@ create 640 slurm root # documentation to be found at https://slurm.schedmd.com/slurm.conf.html section Logging postrotate -{% if hostgroup == 'ManagementNodes' %} +{% if inventory_hostname in groups.ManagementNodes %} pkill -x --signal SIGUSR2 slurmctld {% else %} pkill -x --signal SIGUSR2 slurmd