Skip to content
Snippets Groups Projects
Commit 4b2a57d9 authored by Andreas Hamacher's avatar Andreas Hamacher Committed by Chris Hines
Browse files

Ubuntu20baseimage

parent 0a7000b3
No related branches found
No related tags found
1 merge request!503Ubuntu20baseimage
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
......
#consolidated GRES configuration file
# example entry:
#NodeName=m3f0[00-31] Name=gpu Type=K1 File=/dev/nvidia0 CPUs=0-2
......@@ -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:
......
......@@ -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:
......
......@@ -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 }}
......
---
- name: Make sure OS is updated since apt install might fail
apt:
update_cache: yes
become: true
- name: "Installing MySQL for Ubuntu"
apt: name="{{ server_packages }}" update_cache=yes state=present
become: true
- name: Comment out bind address so it doesn't bind to 127.0.0.1
replace:
path: /etc/mysql/mariadb.conf.d/50-server.cnf
regexp: '(.*bind.*)'
replace: '#\1'
become: true
- name: make sure mysql conf directory exists
file: dest=/etc/mysql/conf.d state=directory
become: true
register: mysqldb_confdir_create
- name: "Starting MySQL"
service: name={{ sqlServiceName }} state=started enabled=true
become: true
- name: Check that the slurm_acct_db_directory exists
stat:
path: /var/lib/mysql/slurm_acct_db/ #defined in /vars/filesystems.yaml
register: slurm_acct_db_directory_result
# this will only work if a completely fresh db gets installed because it gets shipped with a blank root pw
- name: set mysql root password for all root accounts fails on update
mysql_user: name=root host=localhost password={{ mysql_root_password }} login_user=root check_implicit_admin=yes
become: true
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 }}
become: true
become_user: root
- name: "Giving priviliges to user"
mysql_user: name={{ mysql_user_name }} host={{ mysql_user_host }} password={{ mysql_user_password }} login_user=root login_password={{ mysql_root_password }} priv={{ mysql_user_db_name }}.*:ALL,GRANT state=present
when: mysql_user_host is defined
become: true
become_user: root
- name: "Giving priviliges to user"
mysql_user: name={{ mysql_user_name }} host="{{ item }}" password={{ mysql_user_password }} login_user=root login_password={{ mysql_root_password }} priv={{ mysql_user_db_name }}.*:ALL,GRANT state=present
with_items: "{{ mysql_user_hosts_group }}"
when: mysql_user_hosts_group is defined
become: true
become_user: root
- name: "Giving priviliges to user with domain"
mysql_user: name={{ mysql_user_name }} host="{{ item }}.{{ domain }}" password={{ mysql_user_password }} login_user=root login_password={{ mysql_root_password }} priv={{ mysql_user_db_name }}.*:ALL,GRANT state=present
with_items: "{{ mysql_user_hosts_group }}"
when: mysql_user_hosts_group is defined
become: true
become_user: root
server_packages:
- python3
- python3-dev
- libmariadb-dev
- python3-pip
- libapache2-mod-wsgi
- python3-mysql.connector
- mariadb-server
- python3-mysqldb
client_packages:
- python3
- mariadb-client
sqlServiceName: "mariadb"
---
- 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
{% 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment