Trying to adhere to python naming convention.

This commit is contained in:
Egon Rijpkema
2018-04-23 15:52:21 +02:00
parent d54af88505
commit 6a048fc437
32 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,19 @@
FROM ubuntu:16.04
# install packages
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5EDB1B62EC4926EA
RUN set -x \
&& echo "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main" > /etc/apt/sources.list.d/ocata.list \
&& apt-get -y update \
&& apt-get -y install ubuntu-cloud-keyring \
&& apt-get -y update \
&& apt-get -y install \
python-openstackclient \
&& apt-get -y clean
# add bootstrap script and make it executable
COPY admin-openrc.sh /root/admin-openrc.sh
COPY demo-openrc.sh /root/demo-openrc.sh

View File

@ -0,0 +1,21 @@
# ubuntu 16.04 openstack ocata neutron controler node
## How to build the docker image.
```
docker build . -t="hpc/neutroncontroller"
```
## How to bootstrap the service.
Before we can take the container into service we need accounts in keystone.
We also need an initial database. Both of these tasks are performed by the bootstrap script.
```
docker run --rm --it --add-host="controller:<keystone_ip>" hpc/neutroncontroler /etc/bootstrap.sh
```
## How to run
This image needs a lot of environment variables. It should be run via the `hpc-cloud` ansible repository.
## Notes
This image is designed to be deployed from the [hpc-cloud repo](https://git.webhosting.rug.nl/HPC/hpc-cloud)
The -p option is added to the run command to make the container accessible from (containers on ) other hosts than the container host.

21
openstack_client/bootstrap.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
# Create admin-openrc.sh from secrets that are in the environment during bootstrap.
cat << EOF > /root/admin-openrc.sh
#!/bin/bash
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=${OS_PASSWORD}
export OS_AUTH_URL=http://${KEYSTONE_HOST}:35357/v3
export OS_IDENTITY_API_VERSION=3
EOF
# Create demo-openrc.sh
cat << EOF > /root/demo-openrc.sh
#!/bin/bash
export OS_TENANT_NAME=demo
export OS_USERNAME=demo
export OS_PASSWORD=${OS_DEMO_PASSWORD}
export OS_AUTH_URL=http://${KEYSTONE_HOST}:35357/v3
export OS_IDENTITY_API_VERSION=3
EOF

View File

@ -0,0 +1,13 @@
#!/bin/bash
# a admin-openrc.sh file
KEYSTONE_HOST=keystone # to be set via docker run --host option
export OS_IDENTITY_API_VERSION=3
export OS_USERNAME=demo
export OS_PASSWORD=geheim
export OS_TENANT_NAME=admin
export OS_AUTH_URL=http://${KEYSTONE_HOST}:5000/v3
export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_NAME=demo
export OS_IMAGE_API_VERSION=2