An already authorized user must create an user at https://console.otc.t-systems.com/iam/users with "password at first login" for dashboard access, next steps are for new user:
Create terraform-username at https://console.otc.t-systems.com/iam/users to get access key id and secret for terraform access
Save as environment in ~.bash_profile or ~.bashrc or Windows-Umgebungsvariablen (restart) like:
export TF_VAR_otc_access_key='sfwr2334c4'
export TF_VAR_otc_secret_key='gertg245f5435f5ervtrete'
export TF_VAR_db_passwd='rwevt43' -->Ask an ITC
export AWS_ACCESS_KEY_ID='sfwr2334c4'
export AWS_SECRET_ACCESS_KEY='gertg245f5435f5ervtrete'
Install Terraform, see terraform.io (windows need environment entry, behind proxy set HTTP_PROXY=http://XXX:XX)
Checkout repo
git clone https://github.com/samply/open-telekom-cloud.git
cd open-telekom-cloud
Add your ssh key as ignition_user and at this user to ignition_config of server for ssh access to server (main.tf)
To build a test instance, being accessible at https:// (search | auth | mdr) .test.germanbiobanknode.de
:
terraform workspace new test
terraform workspace select test
To return to productive instance:
terraform workspace select default
Init server, db, networks, ... with:
terraform init
terraform plan
terraform apply
Connect over ssh with user core@ prod=80.158.32.82 or test=80.158.4.11
Our VMs use Container Linux basis images. One can download them here. The images have to be imported into the OTC Image Management Service. The following steps have to be taken:
coreos_production_openstack_image.img.bz2
from CoreOScoreos.obs.eu-de.otc.t-systems.com
bucketcontainer-linux-<version>
The Terraform Module Postgres describes a managed postgres database resource (RDS). The database is available under the hostname postgres.openstacklocal
.
ssh -L 5432:postgres:5432 otc-server-prod
CREATE DATABASE auth;
CREATE USER auth_user WITH ENCRYPTED PASSWORD '...';
GRANT auth_user TO root;
GRANT ALL PRIVILEGES ON DATABASE auth TO auth_user;
Check that the certificate isn't already known:
docker run --rm -v /etc/nginx/ssl:/etc/letsencrypt certbot/certbot:v0.36.0 certificates
First do a dry run for each domain:
docker run -it --rm \
-v /etc/nginx/ssl:/etc/letsencrypt \
-v acme-challenge:/certbot \
certbot/certbot:v0.36.0 \
certonly --dry-run --agree-tos --webroot --webroot-path /certbot \
-d <domain>
If Nginx is down because of missing certificates, uncomment all server blocks listening to 443.
Than do the same removing --dry-run
server-data-(test/default)
terraform import module.server.opentelekomcloud_blockstorage_volume_v2.data <id>