Skip to content
This repository has been archived by the owner on Aug 15, 2022. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Berendt <[email protected]>
  • Loading branch information
Christian Berendt committed Aug 21, 2020
0 parents commit bb719d6
Show file tree
Hide file tree
Showing 71 changed files with 1,706 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'Type: Bugfix': ['fix/*', 'issue/*']
'Type: Build': build/*
'Type: CI': ['ci/*', 'travis/*', 'zuul/*']
'Type: Documentation': ['docs/*', 'doc/*', 'documentation/*']
'Type: Feature': ['feature/*', 'feat/*']
'Type: Maintenance': ['chore/*', 'renovate/*']
'Type: Refactoring': ['refactor/*', 'refactoring/*']
'Type: Release': release/*
'Type: Style': style/*
'Type: Testing': ['test/*', 'testing/*']
6 changes: 6 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": [
"config:base"
],
"commitBody": "Signed-off-by: Renovate Bot <[email protected]>"
}
11 changes: 11 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: PR labeler
on:
pull_request:
types: [opened]

jobs:
default:
runs-on: ubuntu-latest
steps:
- uses: technote-space/pr-labeler-action@v4
19 changes: 19 additions & 0 deletions .github/workflows/syntax-ansible.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Check ansible syntax

on:
push:
paths:
- 'environments/**.yml'
- 'playbooks/**.yml'
pull_request:
paths:
- 'environments/**.yml'
- 'playbooks/**.yml'

jobs:
default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ansible/ansible-lint-action@master
23 changes: 23 additions & 0 deletions .github/workflows/syntax-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Check python syntax

on:
push:
paths:
- '**.py'
pull_request:
paths:
- '**.py'

jobs:
default:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- run: pip3 install flake8
- run: flake8
23 changes: 23 additions & 0 deletions .github/workflows/syntax-rst.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Check rst syntax

on:
push:
paths:
- '**.rst'
pull_request:
paths:
- '**.rst'

jobs:
default:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- run: pip3 install doc8
- run: doc8 --max-line-length 100
25 changes: 25 additions & 0 deletions .github/workflows/syntax-yaml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Check yaml syntax

on:
push:
paths:
- '**.yml'
- '**.yaml'
pull_request:
paths:
- '**.yml'
- '**.yaml'

jobs:
default:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- run: pip3 install yamllint
- run: yamllint --config-file .github/yamllint.yml .
38 changes: 38 additions & 0 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Verify terraform

on:
push:
paths:
- 'terraform/**'
- '.github/workflows/terraform.yml'
pull_request:
paths:
- 'terraform/**'
- '.github/workflows/terraform.yml'

jobs:
default:
runs-on: ubuntu-latest
strategy:
matrix:
terraform-version:
- 0.12.29
- 0.13.0

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup terraform
uses: hashicorp/setup-terraform@v1
with:
terraform_version: ${{ matrix.terraform-version }}
- name: Terraform init
run: terraform init
working-directory: ./terraform
- name: Terraform format
run: terraform fmt -check
working-directory: ./terraform
- name: Terraform validate
run: terraform validate
working-directory: ./terraform
6 changes: 6 additions & 0 deletions .github/yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
extends: default

rules:
line-length: disable
truthy: disable
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.MANAGER_ADDRESS.*
.deploy.*
.id_rsa.*
.terraform
.tox
.venv
Pipfile.lock
clouds.yaml
clouds.yml
contrib/es_test_data.py
contrib/mysql_random_data_load
docs/build
environments/**/ceph.client.*.keyring
roles
secrets
secure.yaml
secure.yml
terraform.tfstate*
terraform.tfstate.d
31 changes: 31 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
================================================
SCS Identity and Access Management (IAM) testbed
================================================

This testbed provides a minimized SCS manager node. By default MariaDB,
Keystone, Keyloak and Horizon are deployed.

This testbed focuses on working with Keystone and Keycloak in the context
of the GAIA-X MVP WP.

The testbed is based on the `testbed of the OSISM project <https://github.com/osism/testbed>`_.
Documentation is available at https://docs.osism.de/testbed/.

Webinterfaces & API endpoints
=============================

The web interfaces and API endpoints can also be accessed externally via
the assigned floating IP address of the instance.

================ =========================== ========= ================
Name URL Username Password
================ =========================== ========= ================
ARA http://192.168.40.5:8120 ara password
Cockpit https://192.168.40.5:8130 dragon da5pahthaew2Pai2
Horizon http://192.168.40.200 admin password
Keycloak http://192.168.40.5:8170 admin password
Keystone http://192.168.40.200:35357 admin password
Keystone http://192.168.40.200:5000 admin password
RabbitMQ http://192.168.40.5:15672 openstack password
phpMyAdmin http://192.168.40.5:8110 root password
================ =========================== ========= ================
1 change: 1 addition & 0 deletions environments/.vault_pass
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
password
45 changes: 45 additions & 0 deletions environments/ansible.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[defaults]
# hide "[WARNING]: Invalid characters were found in group names but not replaced,
# use -vvvv to see details" warning message
force_valid_group_names = ignore

host_key_checking = false

# hide "[WARNING]: Platform linux on host x is using the discovered Python interpreter at
# /usr/bin/python, but future installation of another Python interpreter could change this"
# warning message
#
# https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more
interpreter_python = auto_legacy_silent

inventory = /opt/configuration/inventory

# hide paramiko transport logging messages
log_filter = paramiko.transport

log_path=/ansible/logs/ansible.log
private_key_file = /ansible/secrets/id_rsa.operator
retry_files_enabled = false
roles_path = /ansible/roles:/ansible/galaxy

# strategy
# strategy_plugins = /ansible/plugins/mitogen/ansible_mitogen/plugins/strategy
# strategy = mitogen_linear

# Fact caching
gathering = smart
fact_caching = redis
fact_caching_timeout = 86400
fact_caching_connection = cache:6379:0

# NO CHANGE OVER THIS LINE -- YOUR CHANGES WILL BE OVERWRITTEN
###############################################################################

# Customer-specific adjustments can be set here.
remote_user = dragon

###############################################################################
# NO CHANGE UNDER THIS LINE -- YOUR CHANGES WILL BE OVERWRITTEN

[ssh_connection]
pipelining = true
74 changes: 74 additions & 0 deletions environments/configuration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
##########################
# configuration

configuration_directory: /opt/configuration

configuration_type: git
configuration_git_version: master
configuration_git_host: github.com
configuration_git_port: 443
configuration_git_repository: SovereignCloudStack/testbed-iam.git
configuration_git_protocol: https

##########################
# docker

docker_user: "{{ operator_user }}"

docker_configure_storage_driver: yes
docker_storage_driver: overlay2

ceph_docker_registry: index.docker.io
docker_registry: index.docker.io
docker_registry_ansible: quay.io

##########################
# docker-compose

docker_compose_install_type: package

##########################
# versions

docker_version: "5:19.03.5"
repository_version: latest

##########################
# operator

operator_authorized_keys:
- "{{lookup('file', '/ansible/secrets/id_rsa.operator.pub')}}"

##########################
# resolvconf

resolvconf_nameserver:
- 9.9.9.9
- 149.112.112.112
resolvconf_search: osism.local
resolvconf_package: ""

##########################
# hosts

hosts_type: template
hosts_additional_entries:
api.osism.local: 192.168.40.200

##########################
# common

cleanup_services:
- NetworkManager
- iscsid
- lxcfs
- nscd
- ntp
- networkd-dispatcher
- systemd-networkd

##########################
# kolla

kolla_internal_vip_address: 192.168.40.200
4 changes: 4 additions & 0 deletions environments/custom/configuration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
# Dummy variable to avoid error because ansible does not recognize the
# file as a good configuration file when no variable in it.
dummy:
46 changes: 46 additions & 0 deletions environments/custom/files/testbed_network_devices.fact
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env python3

import json
import netifaces

NETWORKS = {
'external': '192.168.90',
'internal': '192.168.50',
'management': '192.168.40',
'storage_frontend': '192.168.70',
'storage_backend': '192.168.80',
'provider': '192.168.100'
}

result = {}

for interface in netifaces.interfaces():
if interface in ['lo', 'docker0', 'ohm0']:
continue
elif interface.startswith('br'):
continue
elif interface.startswith('ovs'):
continue
elif interface.startswith('vxlan'):
continue
elif interface.startswith('veth'):
continue
elif interface.startswith('tap'):
continue
elif interface.startswith('qg'):
continue

addrs = netifaces.ifaddresses(interface)
if netifaces.AF_INET in addrs:
addr = addrs[netifaces.AF_INET][0]['addr']

for network in NETWORKS:
if addr.startswith(NETWORKS[network]):
result[network] = interface

# NOTE: After a reboot of the nodes the provider network has
# no more IP configuration.
else:
result['provider'] = interface

print(json.dumps(result))
Loading

0 comments on commit bb719d6

Please sign in to comment.