Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions ansible-collection-requirements.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
collections:
- name: https://opendev.org/openstack/ansible-collections-openstack
version: 2.2.0
type: git
- name: https://github.com/ansible-collections/ansible.posix
version: 1.5.4
type: git
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
46 changes: 46 additions & 0 deletions apps/openstack/bin/backup-mariadb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash
# shellcheck disable=SC2124,SC2145,SC2294,SC2086

# The script is used to backup the mariadb database in the openstack namespace
# The script will create a backup directory in the HOME directory with the current timestamp
# The script will dump all the databases except the performance_schema and information_schema
# The script will use the root password from the mariadb secret to connect to the database
# The script will use the clusterIP of the mariadb-cluster service to connect to the database
# The script will use the --column-statistics=0 option if available in the mysqldump command
# The script will create a separate dump file for each database

set -e
set -o pipefail

BACKUP_DIR="${HOME}/backup/mariadb/$(date +%s)"
MYSQL_PASSWORD="$(kubectl --namespace openstack get secret mariadb -o jsonpath='{.data.root-password}' | base64 -d)"
MYSQL_HOST=$(kubectl -n openstack get service mariadb-cluster -o jsonpath='{.spec.clusterIP}')

if mysqldump --help | grep -q column-statistics; then
MYSQL_DUMP_COLLUMN_STATISTICS="--column-statistics=0"
else
MYSQL_DUMP_COLLUMN_STATISTICS=""
fi

mkdir -p "${BACKUP_DIR}"

pushd "${BACKUP_DIR}"
mysql -h ${MYSQL_HOST} \
-u root \
-p${MYSQL_PASSWORD} \
-e 'show databases;' \
--column-names=false \
--vertical | \
awk '/[:alnum:]/ && ! /performance_schema/ && ! /information_schema/' | \
xargs -i mysqldump --host=${MYSQL_HOST} ${MYSQL_DUMP_COLLUMN_STATISTICS} \
--user=root \
--password=${MYSQL_PASSWORD} \
--single-transaction \
--routines \
--triggers \
--events \
--result-file={} \
{}
popd

echo -e "backup complete and available at ${BACKUP_DIR}"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions apps/openstack/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ansible>9.0,<10.0
ansible-core<2.17.0
cryptography==43.0.1
jinja2==3.1.5
jmespath==1.0.1
jsonschema<=4.23.0
MarkupSafe==2.1.3
netaddr==0.9.0
pbr==5.11.1
ruamel.yaml==0.18.6
ruamel.yaml.clib==0.2.8
kubernetes>=24.2.0
openstacksdk>=1.0.0
python-openstackclient==7.4.0
13 changes: 13 additions & 0 deletions apps/openstack/requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
collections:
- name: https://opendev.org/openstack/ansible-collections-openstack
version: 2.2.0
type: git
- name: https://github.com/ansible-collections/ansible.posix
version: 1.5.4
type: git
- name: https://github.com/ansible-collections/community.general
version: 8.2.0
type: git
- name: https://github.com/ansible-collections/kubernetes.core
version: 3.2.0
type: git
File renamed without changes.
36 changes: 0 additions & 36 deletions cve/filter.py

This file was deleted.

7 changes: 0 additions & 7 deletions doc-requirements.txt

This file was deleted.

286 changes: 0 additions & 286 deletions docs/accelerated-computing-infrastructure.md

This file was deleted.

183 changes: 0 additions & 183 deletions docs/accelerated-computing-overview.md

This file was deleted.

Loading
Loading