Compare commits
20 Commits
149590eb35
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
0dbcabb4a2 | ||
|
1920804c3c | ||
|
4481b09bbc | ||
|
52db295b69 | ||
|
07def88ceb | ||
|
77c512977f | ||
|
455e10c7ab | ||
|
d51c52d35c | ||
|
510b68d156 | ||
|
7f49c6d706 | ||
|
75434ae097 | ||
|
90b394e456 | ||
|
53bfd40ea6 | ||
|
00bb496ec5 | ||
|
7e7ab04df0 | ||
|
f4f9b95d09 | ||
|
6a048fc437 | ||
|
d54af88505 | ||
|
d8073d485b | ||
|
830e940fa2 |
40
.drone.yml
40
.drone.yml
@@ -94,6 +94,26 @@ pipeline:
|
|||||||
tag: latest
|
tag: latest
|
||||||
when:
|
when:
|
||||||
branch: master
|
branch: master
|
||||||
|
keystone_merlin:
|
||||||
|
image: plugins/docker
|
||||||
|
dockerfile: keystone/Dockerfile
|
||||||
|
context: keystone
|
||||||
|
secrets: [docker_username, docker_password]
|
||||||
|
registry: registry.webhosting.rug.nl
|
||||||
|
repo: registry.webhosting.rug.nl/hpc/openstack-keystone-merlin
|
||||||
|
tag: latest
|
||||||
|
when:
|
||||||
|
branch: merlin
|
||||||
|
horizon_merlin:
|
||||||
|
image: plugins/docker
|
||||||
|
dockerfile: horizon/Dockerfile
|
||||||
|
context: horizon
|
||||||
|
secrets: [docker_username, docker_password]
|
||||||
|
registry: registry.webhosting.rug.nl
|
||||||
|
repo: registry.webhosting.rug.nl/hpc/openstack-horizon-merlin
|
||||||
|
tag: latest
|
||||||
|
when:
|
||||||
|
branch: merlin
|
||||||
neutron_controller_merlin:
|
neutron_controller_merlin:
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
dockerfile: neutron_controller/Dockerfile
|
dockerfile: neutron_controller/Dockerfile
|
||||||
@@ -104,6 +124,16 @@ pipeline:
|
|||||||
tag: latest
|
tag: latest
|
||||||
when:
|
when:
|
||||||
branch: merlin
|
branch: merlin
|
||||||
|
cinder_controller_merlin:
|
||||||
|
image: plugins/docker
|
||||||
|
dockerfile: cinder_controller/Dockerfile
|
||||||
|
context: cinder_controller
|
||||||
|
secrets: [docker_username, docker_password]
|
||||||
|
registry: registry.webhosting.rug.nl
|
||||||
|
repo: registry.webhosting.rug.nl/hpc/openstack-cinder-controller-merlin
|
||||||
|
tag: latest
|
||||||
|
when:
|
||||||
|
branch: mwelin
|
||||||
cinder_storage_merlin:
|
cinder_storage_merlin:
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
dockerfile: cinder_storage/Dockerfile
|
dockerfile: cinder_storage/Dockerfile
|
||||||
@@ -134,6 +164,16 @@ pipeline:
|
|||||||
tag: latest
|
tag: latest
|
||||||
when:
|
when:
|
||||||
branch: merlin
|
branch: merlin
|
||||||
|
heat_merlin:
|
||||||
|
image: plugins/docker
|
||||||
|
dockerfile: heat/Dockerfile
|
||||||
|
context: heat
|
||||||
|
secrets: [docker_username, docker_password]
|
||||||
|
registry: registry.webhosting.rug.nl
|
||||||
|
repo: registry.webhosting.rug.nl/hpc/openstack-heat-merlin
|
||||||
|
tag: latest
|
||||||
|
when:
|
||||||
|
branch: merlin
|
||||||
notify:
|
notify:
|
||||||
image: drillster/drone-email
|
image: drillster/drone-email
|
||||||
host: smtp.rug.nl
|
host: smtp.rug.nl
|
||||||
|
@@ -7,6 +7,7 @@ cinder-scheduler -d &
|
|||||||
sleep 5
|
sleep 5
|
||||||
apachectl -DFOREGROUND &
|
apachectl -DFOREGROUND &
|
||||||
|
|
||||||
|
tail -f /var/log/apache2/* &
|
||||||
# If any process fails, kill the rest.
|
# If any process fails, kill the rest.
|
||||||
# This ensures the container stops and systemd will restart it.
|
# This ensures the container stops and systemd will restart it.
|
||||||
|
|
||||||
|
8
cinder_storage/.gitignore
vendored
8
cinder_storage/.gitignore
vendored
@@ -1,8 +0,0 @@
|
|||||||
# ---> Vim
|
|
||||||
[._]*.s[a-w][a-z]
|
|
||||||
[._]s[a-w][a-z]
|
|
||||||
*.un~
|
|
||||||
Session.vim
|
|
||||||
.netrwhist
|
|
||||||
*~
|
|
||||||
|
|
@@ -15,8 +15,7 @@ RUN set -x \
|
|||||||
python-openstackclient \
|
python-openstackclient \
|
||||||
python-oslo.cache \
|
python-oslo.cache \
|
||||||
lvm2 \
|
lvm2 \
|
||||||
python-ceph \
|
tgt \
|
||||||
python-rbd \
|
|
||||||
|
|
||||||
&& apt-get -y clean
|
&& apt-get -y clean
|
||||||
|
|
||||||
@@ -29,6 +28,8 @@ COPY bootstrap.sh /etc/bootstrap.sh
|
|||||||
|
|
||||||
COPY run.sh /etc/run.sh
|
COPY run.sh /etc/run.sh
|
||||||
|
|
||||||
|
COPY lvm.conf /etc/lvm/lvm.conf
|
||||||
|
|
||||||
RUN chown root.root /etc/bootstrap.sh && chmod a+x /etc/bootstrap.sh
|
RUN chown root.root /etc/bootstrap.sh && chmod a+x /etc/bootstrap.sh
|
||||||
RUN chown root.root /etc/run.sh && chmod a+x /etc/run.sh
|
RUN chown root.root /etc/run.sh && chmod a+x /etc/run.sh
|
||||||
|
|
||||||
|
@@ -22,6 +22,6 @@ source /root/admin-openrc.sh
|
|||||||
|
|
||||||
# create a LVM physical volume and volume group.
|
# create a LVM physical volume and volume group.
|
||||||
# This device should be available tpo the container
|
# This device should be available tpo the container
|
||||||
#pvcreate /dev/cinder_storage_volume
|
pvcreate $CINDER_STORAGE_VOLUME
|
||||||
#vgcreate cinder-volumes /dev/cinder_storage_volume
|
vgcreate cinder-volumes $CINDER_STORAGE_VOLUME
|
||||||
|
|
||||||
|
@@ -3,9 +3,7 @@
|
|||||||
# Write the config files
|
# Write the config files
|
||||||
/etc/write_conf.sh
|
/etc/write_conf.sh
|
||||||
# start cinder processes.
|
# start cinder processes.
|
||||||
cinder-volume -d &
|
tgtd
|
||||||
|
|
||||||
sleep 5
|
|
||||||
|
|
||||||
cinder-volume -d &
|
cinder-volume -d &
|
||||||
|
|
||||||
|
@@ -9,10 +9,11 @@ cat << EOF > /etc/cinder/cinder.conf
|
|||||||
connection = mysql+pymysql://$CINDER_USER:$CINDER_PASSWORD@$MYSQL_HOST/cinder
|
connection = mysql+pymysql://$CINDER_USER:$CINDER_PASSWORD@$MYSQL_HOST/cinder
|
||||||
|
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
|
storage_availability_zone="$AVAILABILITY_ZONE"
|
||||||
auth_strategy = keystone
|
auth_strategy = keystone
|
||||||
transport_url = rabbit://$RABBIT_USER:$RABBIT_PASSWORD@$RABBIT_HOST
|
transport_url = rabbit://$RABBIT_USER:$RABBIT_PASSWORD@$RABBIT_HOST
|
||||||
my_ip = $MY_IP
|
my_ip = $MY_IP
|
||||||
enabled_backends = RBD-backend
|
enabled_backends = lvm
|
||||||
glance_api_servers = http://$GLANCE_HOST:9292
|
glance_api_servers = http://$GLANCE_HOST:9292
|
||||||
|
|
||||||
[keystone_authtoken]
|
[keystone_authtoken]
|
||||||
@@ -29,12 +30,11 @@ password = $CINDER_PASSWORD
|
|||||||
[oslo_concurrency]
|
[oslo_concurrency]
|
||||||
lock_path = /var/lib/cinder/tmp
|
lock_path = /var/lib/cinder/tmp
|
||||||
|
|
||||||
[RBD-backend]
|
[lvm]
|
||||||
volume_backend_name=RBD-backend
|
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
|
||||||
rbd_pool=volumes
|
volume_group = cinder-volumes
|
||||||
rbd_user=volumes
|
iscsi_protocol = iscsi
|
||||||
rbd_secret_uuid=d0db6ba7-a0c9-4da6-b0bc-aa7846325333
|
iscsi_helper = tgtadm
|
||||||
volume_driver=cinder.volume.drivers.rbd.RBDDriver
|
volumes_dir = /var/lib/cinder/volumes
|
||||||
rbd_ceph_conf=/etc/ceph/ceph.conf
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
1
glance/.gitignore
vendored
1
glance/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
build.sh
|
|
@@ -14,8 +14,6 @@ RUN set -x \
|
|||||||
python-mysqldb \
|
python-mysqldb \
|
||||||
python-openstackclient \
|
python-openstackclient \
|
||||||
python-oslo.cache \
|
python-oslo.cache \
|
||||||
python-rbd \
|
|
||||||
python-ceph \
|
|
||||||
&& apt-get -y clean \
|
&& apt-get -y clean \
|
||||||
&& rm -f /var/lib/glance/glance.sqlite
|
&& rm -f /var/lib/glance/glance.sqlite
|
||||||
|
|
||||||
|
@@ -32,14 +32,13 @@ flavor = keystone
|
|||||||
|
|
||||||
|
|
||||||
[glance_store]
|
[glance_store]
|
||||||
stores = glance.store.rbd.Store
|
stores = file,http
|
||||||
default_store = rbd
|
default_store = file
|
||||||
rbd_store_pool = images
|
filesystem_store_datadir = /var/lib/glance/images/
|
||||||
rbd_store_user = images
|
|
||||||
rbd_store_ceph_conf = /etc/ceph/ceph.conf
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
cat << EOF > /etc/glance/glance-registry.conf
|
cat << EOF > /etc/glance/glance-registry.conf
|
||||||
|
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
@@ -50,11 +49,9 @@ rpc_backend = rabbit
|
|||||||
connection = mysql+pymysql://$GLANCE_USER:$GLANCE_PASSWORD@$MYSQL_HOST/glance
|
connection = mysql+pymysql://$GLANCE_USER:$GLANCE_PASSWORD@$MYSQL_HOST/glance
|
||||||
|
|
||||||
[glance_store]
|
[glance_store]
|
||||||
stores = glance.store.rbd.Store
|
stores = file,http
|
||||||
default_store = rbd
|
default_store = file
|
||||||
rbd_store_pool = images
|
filesystem_store_datadir = /var/lib/glance/images/
|
||||||
rbd_store_user = images
|
|
||||||
rbd_store_ceph_conf = /etc/ceph/ceph.conf
|
|
||||||
|
|
||||||
[keystone_authtoken]
|
[keystone_authtoken]
|
||||||
auth_uri = http://$KEYSTONE_HOST:5000
|
auth_uri = http://$KEYSTONE_HOST:5000
|
||||||
|
8
heat/.gitignore
vendored
8
heat/.gitignore
vendored
@@ -1,8 +0,0 @@
|
|||||||
# ---> Vim
|
|
||||||
[._]*.s[a-w][a-z]
|
|
||||||
[._]s[a-w][a-z]
|
|
||||||
*.un~
|
|
||||||
Session.vim
|
|
||||||
.netrwhist
|
|
||||||
*~
|
|
||||||
|
|
8
horizon/.gitignore
vendored
8
horizon/.gitignore
vendored
@@ -1,8 +0,0 @@
|
|||||||
# ---> Vim
|
|
||||||
[._]*.s[a-w][a-z]
|
|
||||||
[._]s[a-w][a-z]
|
|
||||||
*.un~
|
|
||||||
Session.vim
|
|
||||||
.netrwhist
|
|
||||||
*~
|
|
||||||
|
|
8
keystone/.gitignore
vendored
8
keystone/.gitignore
vendored
@@ -1,8 +0,0 @@
|
|||||||
# ---> Vim
|
|
||||||
[._]*.s[a-w][a-z]
|
|
||||||
[._]s[a-w][a-z]
|
|
||||||
*.un~
|
|
||||||
Session.vim
|
|
||||||
.netrwhist
|
|
||||||
*~
|
|
||||||
|
|
8
neutron_controller/.gitignore
vendored
8
neutron_controller/.gitignore
vendored
@@ -1,8 +0,0 @@
|
|||||||
# ---> Vim
|
|
||||||
[._]*.s[a-w][a-z]
|
|
||||||
[._]s[a-w][a-z]
|
|
||||||
*.un~
|
|
||||||
Session.vim
|
|
||||||
.netrwhist
|
|
||||||
*~
|
|
||||||
|
|
@@ -29,15 +29,8 @@ neutron-metadata-agent \
|
|||||||
--config-dir /etc/neutron/ \
|
--config-dir /etc/neutron/ \
|
||||||
-v -d &
|
-v -d &
|
||||||
|
|
||||||
sleep 3
|
|
||||||
neutron-l3-agent \
|
|
||||||
--config-file /etc/neutron/l3_agent.ini \
|
|
||||||
--config-file /etc/neutron/neutron.conf \
|
|
||||||
--config-file /etc/neutron/metadata_agent.ini \
|
|
||||||
--config-dir /etc/neutron/ \
|
|
||||||
-v -d &
|
|
||||||
# If any process fails, kill the rest.
|
# If any process fails, kill the rest.
|
||||||
# This ensures the container stops and systemd will restart it.
|
# This insures the container stops and systemd will restart it.
|
||||||
|
|
||||||
wait -n
|
wait -n
|
||||||
pkill -P $$
|
pkill -P $$
|
||||||
|
@@ -4,16 +4,15 @@
|
|||||||
# These are to be passed to the docker container using -e
|
# These are to be passed to the docker container using -e
|
||||||
|
|
||||||
cat << EOF > /etc/neutron/neutron.conf
|
cat << EOF > /etc/neutron/neutron.conf
|
||||||
|
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
core_plugin = ml2
|
core_plugin = ml2
|
||||||
service_plugins = router
|
service_plugins =
|
||||||
allow_overlapping_ips = True
|
|
||||||
transport_url = rabbit://$RABBIT_USER:$RABBIT_PASSWORD@$MY_IP
|
transport_url = rabbit://$RABBIT_USER:$RABBIT_PASSWORD@$MY_IP
|
||||||
auth_strategy = keystone
|
auth_strategy = keystone
|
||||||
notify_nova_on_port_status_changes = true
|
notify_nova_on_port_status_changes = true
|
||||||
notify_nova_on_port_data_changes = true
|
notify_nova_on_port_data_changes = true
|
||||||
dhcp_agents_per_network = 2
|
dhcp_agents_per_network = 2
|
||||||
|
global_physnet_mtu = $GLOBAL_PHYSNET_MTU
|
||||||
|
|
||||||
[agent]
|
[agent]
|
||||||
root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
|
root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
|
||||||
@@ -47,10 +46,11 @@ EOF
|
|||||||
cat << EOF > /etc/neutron/plugins/ml2/ml2_conf.ini
|
cat << EOF > /etc/neutron/plugins/ml2/ml2_conf.ini
|
||||||
|
|
||||||
[ml2]
|
[ml2]
|
||||||
type_drivers = flat,vlan,vxlan
|
type_drivers = flat,vlan
|
||||||
tenant_network_types = vxlan
|
tenant_network_types =
|
||||||
mechanism_drivers = linuxbridge,l2population
|
mechanism_drivers = linuxbridge
|
||||||
extension_drivers = port_security
|
extension_drivers = port_security
|
||||||
|
path_mtu = $GLOBAL_PHYSNET_MTU
|
||||||
|
|
||||||
[ml2_type_vlan]
|
[ml2_type_vlan]
|
||||||
network_vlan_ranges = provider
|
network_vlan_ranges = provider
|
||||||
@@ -58,14 +58,25 @@ network_vlan_ranges = provider
|
|||||||
[ml2_type_flat]
|
[ml2_type_flat]
|
||||||
flat_networks = provider
|
flat_networks = provider
|
||||||
|
|
||||||
[ml2_type_vxlan]
|
|
||||||
vni_ranges = 1:1000
|
|
||||||
|
|
||||||
[securitygroup]
|
[securitygroup]
|
||||||
enable_ipset = true
|
enable_ipset = true
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
cat << EOF > /etc/neutron/plugins/ml2/linuxbridge_agent.ini
|
||||||
|
|
||||||
|
[linux_bridge]
|
||||||
|
physical_interface_mappings = $PHYSICAL_INTERFACE_MAPPINGS
|
||||||
|
|
||||||
|
[vxlan]
|
||||||
|
enable_vxlan = false
|
||||||
|
|
||||||
|
[securitygroup]
|
||||||
|
enable_security_group = true
|
||||||
|
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
cat << EOF > /etc/neutron/metadata_agent.ini
|
cat << EOF > /etc/neutron/metadata_agent.ini
|
||||||
|
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
@@ -73,28 +84,3 @@ nova_metadata_ip = $MY_IP
|
|||||||
metadata_proxy_shared_secret = $METADATA_SECRET
|
metadata_proxy_shared_secret = $METADATA_SECRET
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
cat << EOF > /etc/neutron/plugins/ml2/linuxbridge_agent.ini
|
|
||||||
|
|
||||||
[linux_bridge]
|
|
||||||
physical_interface_mappings = $PHYSICAL_INTERFACE_MAPPINGS
|
|
||||||
|
|
||||||
[vxlan]
|
|
||||||
enable_vxlan = True
|
|
||||||
l2_population = True
|
|
||||||
local_ip = $OVERLAY_IP
|
|
||||||
|
|
||||||
[securitygroup]
|
|
||||||
enable_security_group = true
|
|
||||||
firewall_driver = iptables
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat << EOF > /etc/neutron/l3_agent.ini
|
|
||||||
|
|
||||||
[DEFAULT]
|
|
||||||
interface_driver = linuxbridge
|
|
||||||
external_network_bridge =
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
@@ -1,31 +0,0 @@
|
|||||||
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 \
|
|
||||||
mysql-client \
|
|
||||||
python-mysqldb \
|
|
||||||
python-openstackclient \
|
|
||||||
neutron-server \
|
|
||||||
neutron-plugin-ml2 \
|
|
||||||
neutron-linuxbridge-agent \
|
|
||||||
neutron-l3-agent \
|
|
||||||
neutron-metadata-agent \
|
|
||||||
&& apt-get -y clean
|
|
||||||
|
|
||||||
# add bootstrap script and make it executable
|
|
||||||
COPY bootstrap.sh /etc/bootstrap.sh
|
|
||||||
|
|
||||||
# Workaround for vlan_transparent parameter set to None.
|
|
||||||
COPY db_base_plugin_v2.py /usr/lib/python2.7/dist-packages/neutron/db/db_base_plugin_v2.py
|
|
||||||
|
|
||||||
COPY run.sh /etc/run.sh
|
|
||||||
COPY write_conf.sh /etc/write_conf.sh
|
|
||||||
|
|
||||||
CMD ["/etc/run.sh"]
|
|
@@ -1,21 +0,0 @@
|
|||||||
# 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.
|
|
@@ -1,76 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# This script sets up the openstack users and regions..
|
|
||||||
# as well as the database for the nova controller.
|
|
||||||
# This guide was used:
|
|
||||||
# https://docs.openstack.org/ocata/install-guide-ubuntu/nova-controller-install.
|
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
export OS_PROJECT_DOMAIN_NAME=default
|
|
||||||
export OS_USER_DOMAIN_NAME=default
|
|
||||||
export OS_PROJECT_NAME=admin
|
|
||||||
export OS_IMAGE_API_VERSION=2
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
source /root/admin-openrc.sh
|
|
||||||
|
|
||||||
# create database for neutron.
|
|
||||||
SQL_SCRIPT=/root/neutron.sql
|
|
||||||
mysql -uroot -p"$MYSQL_ROOT_PASSWORD" -h "$MYSQL_HOST" << EOF
|
|
||||||
DROP DATABASE IF EXISTS neutron;
|
|
||||||
CREATE DATABASE neutron;
|
|
||||||
|
|
||||||
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' \
|
|
||||||
IDENTIFIED BY "${NEUTRON_PASSWORD}";
|
|
||||||
|
|
||||||
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' \
|
|
||||||
IDENTIFIED BY "${NEUTRON_PASSWORD}";
|
|
||||||
EOF
|
|
||||||
|
|
||||||
openstack user create "$NEUTRON_USER" --domain default --password "$NEUTRON_PASSWORD"
|
|
||||||
openstack role add --project service --user neutron admin
|
|
||||||
openstack service create --name neutron --description "OpenStack Networking" network
|
|
||||||
|
|
||||||
# neutron endpoints
|
|
||||||
openstack endpoint create --region RegionOne \
|
|
||||||
network public http://$MY_IP:9696
|
|
||||||
|
|
||||||
openstack endpoint create --region RegionOne \
|
|
||||||
network internal http://$MY_IP:9696
|
|
||||||
|
|
||||||
openstack endpoint create --region RegionOne \
|
|
||||||
network admin http://$MY_IP:9696
|
|
||||||
|
|
||||||
# population of the database requires complete server and plug-in configuration files.
|
|
||||||
/etc/write_conf.sh
|
|
||||||
|
|
||||||
# Ugly hacks to prevent the manage command from failing
|
|
||||||
sed -i "/ op.drop_column('networks', 'shared')/ s/^#*/#/" /usr/lib/python2.7/dist-packages/neutron/db/migration/alembic_migrations/versions/liberty/contract/4ffceebfada_rbac_network.py
|
|
||||||
sed -i "/ op.drop_column('subnets', 'shared')/ s/^#*/#/" /usr/lib/python2.7/dist-packages/neutron/db/migration/alembic_migrations/versions/liberty/contract/4ffceebfada_rbac_network.py
|
|
||||||
sed -i "/ op.drop_column('qos_policies', 'shared')/ s/^#*/#/" /usr/lib/python2.7/dist-packages/neutron/db/migration/alembic_migrations/versions/mitaka/contract/c6c112992c9_rbac_qos_policy.py
|
|
||||||
|
|
||||||
neutron-db-manage --config-file /etc/neutron/neutron.conf \
|
|
||||||
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head
|
|
||||||
|
|
||||||
# And now we drop the colums and constraints that the ORM fails to drop.
|
|
||||||
mysql -uroot -p"$MYSQL_ROOT_PASSWORD" -h "$MYSQL_HOST" neutron << EOF
|
|
||||||
|
|
||||||
ALTER TABLE networks DROP CONSTRAINT CONSTRAINT_2;
|
|
||||||
alter table networks drop column shared;
|
|
||||||
|
|
||||||
ALTER TABLE subnets DROP CONSTRAINT CONSTRAINT_2;
|
|
||||||
ALTER TABLE subnets DROP COLUMN shared;
|
|
||||||
|
|
||||||
ALTER TABLE qos_policies DROP CONSTRAINT CONSTRAINT_1;
|
|
||||||
ALTER TABLE qos_policies drop column shared
|
|
||||||
|
|
||||||
EOF
|
|
File diff suppressed because it is too large
Load Diff
@@ -1,43 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# start neutron services
|
|
||||||
|
|
||||||
/etc/write_conf.sh
|
|
||||||
|
|
||||||
/usr/bin/neutron-server \
|
|
||||||
--config-file /etc/neutron/neutron.conf \
|
|
||||||
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini \
|
|
||||||
--config-file /etc/neutron/plugins/ml2/linuxbridge_agent.ini \
|
|
||||||
--config-file /etc/neutron/metadata_agent.ini \
|
|
||||||
--config-dir /etc/neutron/ \
|
|
||||||
-v -d &
|
|
||||||
|
|
||||||
sleep 3
|
|
||||||
/usr/bin/neutron-linuxbridge-agent \
|
|
||||||
--config-file /etc/neutron/neutron.conf \
|
|
||||||
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini \
|
|
||||||
--config-file /etc/neutron/plugins/ml2/linuxbridge_agent.ini \
|
|
||||||
--config-file /etc/neutron/metadata_agent.ini \
|
|
||||||
--config-dir /etc/neutron/ \
|
|
||||||
-v -d &
|
|
||||||
|
|
||||||
sleep 3
|
|
||||||
neutron-metadata-agent \
|
|
||||||
--config-file /etc/neutron/neutron.conf \
|
|
||||||
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini \
|
|
||||||
--config-file /etc/neutron/plugins/ml2/linuxbridge_agent.ini \
|
|
||||||
--config-file /etc/neutron/metadata_agent.ini \
|
|
||||||
--config-dir /etc/neutron/ \
|
|
||||||
-v -d &
|
|
||||||
|
|
||||||
sleep 3
|
|
||||||
neutron-l3-agent \
|
|
||||||
--config-file /etc/neutron/l3_agent.ini \
|
|
||||||
--config-file /etc/neutron/neutron.conf \
|
|
||||||
--config-file /etc/neutron/metadata_agent.ini \
|
|
||||||
--config-dir /etc/neutron/ \
|
|
||||||
-v -d &
|
|
||||||
# If any process fails, kill the rest.
|
|
||||||
# This ensures the container stops and systemd will restart it.
|
|
||||||
|
|
||||||
wait -n
|
|
||||||
pkill -P $$
|
|
@@ -1,100 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Generate config files from environments values.
|
|
||||||
# These are to be passed to the docker container using -e
|
|
||||||
|
|
||||||
cat << EOF > /etc/neutron/neutron.conf
|
|
||||||
|
|
||||||
[DEFAULT]
|
|
||||||
core_plugin = ml2
|
|
||||||
service_plugins = router
|
|
||||||
allow_overlapping_ips = True
|
|
||||||
transport_url = rabbit://$RABBIT_USER:$RABBIT_PASSWORD@$MY_IP
|
|
||||||
auth_strategy = keystone
|
|
||||||
notify_nova_on_port_status_changes = true
|
|
||||||
notify_nova_on_port_data_changes = true
|
|
||||||
dhcp_agents_per_network = 2
|
|
||||||
|
|
||||||
[agent]
|
|
||||||
root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
|
|
||||||
|
|
||||||
[database]
|
|
||||||
connection = mysql+pymysql://$NEUTRON_USER:$NEUTRON_PASSWORD@mariadb/neutron
|
|
||||||
|
|
||||||
[keystone_authtoken]
|
|
||||||
auth_uri = http://$KEYSTONE_HOST:5000
|
|
||||||
auth_url = http://$KEYSTONE_HOST:35357
|
|
||||||
memcached_servers = $MEMCACHED_HOST:11211
|
|
||||||
auth_type = password
|
|
||||||
project_domain_name = Default
|
|
||||||
user_domain_name = Default
|
|
||||||
project_name = service
|
|
||||||
username = $NEUTRON_USER
|
|
||||||
password = $NEUTRON_PASSWORD
|
|
||||||
|
|
||||||
[nova]
|
|
||||||
auth_url = http://$KEYSTONE_HOST:35357
|
|
||||||
auth_type = password
|
|
||||||
project_domain_name = Default
|
|
||||||
user_domain_name = Default
|
|
||||||
region_name = RegionOne
|
|
||||||
project_name = service
|
|
||||||
username = $NOVA_USER
|
|
||||||
password = $NOVA_PASSWORD
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat << EOF > /etc/neutron/plugins/ml2/ml2_conf.ini
|
|
||||||
|
|
||||||
[ml2]
|
|
||||||
type_drivers = flat,vlan,vxlan
|
|
||||||
tenant_network_types = vxlan
|
|
||||||
mechanism_drivers = linuxbridge,l2population
|
|
||||||
extension_drivers = port_security
|
|
||||||
|
|
||||||
[ml2_type_vlan]
|
|
||||||
network_vlan_ranges = provider
|
|
||||||
|
|
||||||
[ml2_type_flat]
|
|
||||||
flat_networks = provider
|
|
||||||
|
|
||||||
[ml2_type_vxlan]
|
|
||||||
vni_ranges = 1:1000
|
|
||||||
|
|
||||||
[securitygroup]
|
|
||||||
enable_ipset = true
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat << EOF > /etc/neutron/metadata_agent.ini
|
|
||||||
|
|
||||||
[DEFAULT]
|
|
||||||
nova_metadata_ip = $MY_IP
|
|
||||||
metadata_proxy_shared_secret = $METADATA_SECRET
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
|
|
||||||
cat << EOF > /etc/neutron/plugins/ml2/linuxbridge_agent.ini
|
|
||||||
|
|
||||||
[linux_bridge]
|
|
||||||
physical_interface_mappings = $PHYSICAL_INTERFACE_MAPPINGS
|
|
||||||
|
|
||||||
[vxlan]
|
|
||||||
enable_vxlan = True
|
|
||||||
l2_population = True
|
|
||||||
local_ip = $OVERLAY_IP
|
|
||||||
|
|
||||||
[securitygroup]
|
|
||||||
enable_security_group = true
|
|
||||||
firewall_driver = iptables
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat << EOF > /etc/neutron/l3_agent.ini
|
|
||||||
|
|
||||||
[DEFAULT]
|
|
||||||
interface_driver = linuxbridge
|
|
||||||
external_network_bridge =
|
|
||||||
|
|
||||||
EOF
|
|
@@ -1,26 +0,0 @@
|
|||||||
---
|
|
||||||
pipeline:
|
|
||||||
docker:
|
|
||||||
image: plugins/docker
|
|
||||||
secrets: [docker_username, docker_password]
|
|
||||||
registry: registry.webhosting.rug.nl
|
|
||||||
repo: registry.webhosting.rug.nl/hpc/openstack-nova-compute
|
|
||||||
tag: latest
|
|
||||||
notify:
|
|
||||||
image: drillster/drone-email
|
|
||||||
host: smtp.rug.nl
|
|
||||||
port: 25
|
|
||||||
skip_verify: true
|
|
||||||
from: drone@webhosting.rug.nl
|
|
||||||
recipients: [e.m.a.rijpkema@rug.nl]
|
|
||||||
recipients: [e.m.a.rijpkema@rug.nl, w.k.nap@rug.nl]
|
|
||||||
recipients_only: true
|
|
||||||
when:
|
|
||||||
status: [success, changed, failure]
|
|
||||||
# slack:
|
|
||||||
# image: plugins/slack
|
|
||||||
# webhook:
|
|
||||||
# channel: docker
|
|
||||||
# when:
|
|
||||||
# branch: [master, merlin]
|
|
||||||
# status: [success, failure]
|
|
@@ -12,16 +12,12 @@ RUN set -x \
|
|||||||
python-openstackclient \
|
python-openstackclient \
|
||||||
nova-compute \
|
nova-compute \
|
||||||
neutron-linuxbridge-agent \
|
neutron-linuxbridge-agent \
|
||||||
neutron-l3-agent \
|
|
||||||
neutron-dhcp-agent \
|
neutron-dhcp-agent \
|
||||||
neutron-metadata-agent \
|
neutron-metadata-agent \
|
||||||
python-ceph \
|
|
||||||
python-rbd \
|
|
||||||
ceph-common \
|
|
||||||
&& apt-get -y clean
|
&& apt-get -y clean
|
||||||
|
|
||||||
COPY write_conf.sh /etc/write_conf.sh
|
COPY write_conf.sh /etc/write_conf.sh
|
||||||
|
|
||||||
COPY run.sh /etc/run.sh
|
COPY run.sh /etc/run.sh
|
||||||
|
RUN echo hoi
|
||||||
CMD ["/etc/run.sh"]
|
CMD ["/etc/run.sh"]
|
||||||
|
@@ -27,7 +27,6 @@ neutron-metadata-agent \
|
|||||||
--config-dir /etc/neutron/ \
|
--config-dir /etc/neutron/ \
|
||||||
-v -d &
|
-v -d &
|
||||||
|
|
||||||
|
|
||||||
# If any process fails, kill the rest.
|
# If any process fails, kill the rest.
|
||||||
# This ensures the container stops and systemd will restart it.
|
# This ensures the container stops and systemd will restart it.
|
||||||
|
|
||||||
|
@@ -36,7 +36,6 @@ firewall_driver = nova.virt.firewall.NoopFirewallDriver
|
|||||||
scheduler_default_filters = AllHostsFilter
|
scheduler_default_filters = AllHostsFilter
|
||||||
allow_migrate_to_same_host = True
|
allow_migrate_to_same_host = True
|
||||||
allow_resize_to_same_host = True
|
allow_resize_to_same_host = True
|
||||||
security_group_api=neutron
|
|
||||||
|
|
||||||
|
|
||||||
[neutron]
|
[neutron]
|
||||||
@@ -123,11 +122,6 @@ allow_resize_to_same_host = True
|
|||||||
|
|
||||||
[libvirt]
|
[libvirt]
|
||||||
virt_type=kvm
|
virt_type=kvm
|
||||||
images_type = rbd
|
|
||||||
images_rbd_pool = compute
|
|
||||||
images_rbd_ceph_conf = /etc/ceph/ceph.conf
|
|
||||||
rbd_user = compute
|
|
||||||
rbd_secret_uuid = d0db6ba7-a0c9-4da6-b0bc-aa7846325333
|
|
||||||
|
|
||||||
[vnc]
|
[vnc]
|
||||||
enabled = True
|
enabled = True
|
||||||
@@ -195,8 +189,6 @@ EOF
|
|||||||
|
|
||||||
cat << EOF > /etc/neutron/neutron.conf
|
cat << EOF > /etc/neutron/neutron.conf
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
service_plugins = router
|
|
||||||
allow_overlapping_ips = True
|
|
||||||
transport_url = rabbit://$RABBIT_USER:$RABBIT_PASSWORD@$RABBIT_HOST
|
transport_url = rabbit://$RABBIT_USER:$RABBIT_PASSWORD@$RABBIT_HOST
|
||||||
auth_strategy = keystone
|
auth_strategy = keystone
|
||||||
core_plugin = ml2
|
core_plugin = ml2
|
||||||
@@ -225,12 +217,17 @@ password = $NOVA_PASSWORD
|
|||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
cat << EOF > /etc/neutron/plugins/ml2/linuxbridge_agent.ini
|
||||||
|
|
||||||
cat << EOF > /etc/neutron/l3_agent.ini
|
[linux_bridge]
|
||||||
|
physical_interface_mappings = $PHYSICAL_INTERFACE_MAPPINGS
|
||||||
|
|
||||||
[DEFAULT]
|
[vxlan]
|
||||||
interface_driver = linuxbridge
|
enable_vxlan = false
|
||||||
external_network_bridge =
|
|
||||||
|
[securitygroup]
|
||||||
|
enable_security_group = true
|
||||||
|
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@@ -254,10 +251,11 @@ EOF
|
|||||||
cat << EOF > /etc/neutron/plugins/ml2/ml2_conf.ini
|
cat << EOF > /etc/neutron/plugins/ml2/ml2_conf.ini
|
||||||
|
|
||||||
[ml2]
|
[ml2]
|
||||||
type_drivers = flat,vlan,vxlan
|
type_drivers = flat,vlan
|
||||||
tenant_network_types = vxlan
|
tenant_network_types =
|
||||||
mechanism_drivers = linuxbridge,l2population
|
mechanism_drivers = linuxbridge
|
||||||
extension_drivers = port_security
|
extension_drivers = port_security
|
||||||
|
path_mtu = $GLOBAL_PHYSNET_MTU
|
||||||
|
|
||||||
[ml2_type_vlan]
|
[ml2_type_vlan]
|
||||||
network_vlan_ranges = provider
|
network_vlan_ranges = provider
|
||||||
@@ -265,52 +263,7 @@ network_vlan_ranges = provider
|
|||||||
[ml2_type_flat]
|
[ml2_type_flat]
|
||||||
flat_networks = provider
|
flat_networks = provider
|
||||||
|
|
||||||
[ml2_type_vxlan]
|
|
||||||
vni_ranges = 1:100
|
|
||||||
|
|
||||||
[securitygroup]
|
[securitygroup]
|
||||||
enable_ipset = true
|
enable_ipset = true
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat << EOF > /etc/neutron/plugins/ml2/linuxbridge_agent.ini
|
|
||||||
|
|
||||||
[linux_bridge]
|
|
||||||
physical_interface_mappings = $PHYSICAL_INTERFACE_MAPPINGS
|
|
||||||
|
|
||||||
[securitygroup]
|
|
||||||
enable_security_group = true
|
|
||||||
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
|
|
||||||
|
|
||||||
[vxlan]
|
|
||||||
enable_vxlan = True
|
|
||||||
l2_population = True
|
|
||||||
local_ip = $OVERLAY_IP
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if [ $USE_CEPH = true ]
|
|
||||||
then cat << EOF > /etc/ceph/ceph.conf
|
|
||||||
[global]
|
|
||||||
fsid = $FSID
|
|
||||||
mon_initial_members = $MON_INITIAL_MEMBERS
|
|
||||||
mon_host = $MON_HOST
|
|
||||||
auth_cluster_required = cephx
|
|
||||||
auth_service_required = cephx
|
|
||||||
auth_client_required = cephx
|
|
||||||
|
|
||||||
# Your network address
|
|
||||||
public network = $PUBLIC_NETWORK
|
|
||||||
osd pool default size = $OSD_POOL_DEFAULT_SIZE
|
|
||||||
|
|
||||||
[client.compute]
|
|
||||||
keyring = /etc/ceph/ceph.client.compute.keyring
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat << EOF > /etc/neutron/l3_agent.ini
|
|
||||||
|
|
||||||
[DEFAULT]
|
|
||||||
interface_driver = linuxbridge
|
|
||||||
external_network_bridge =
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
8
nova_service/.gitignore
vendored
8
nova_service/.gitignore
vendored
@@ -1,8 +0,0 @@
|
|||||||
# ---> Vim
|
|
||||||
[._]*.s[a-w][a-z]
|
|
||||||
[._]s[a-w][a-z]
|
|
||||||
*.un~
|
|
||||||
Session.vim
|
|
||||||
.netrwhist
|
|
||||||
*~
|
|
||||||
|
|
@@ -20,7 +20,7 @@ allow_migrate_to_same_host = True
|
|||||||
allow_resize_to_same_host = True
|
allow_resize_to_same_host = True
|
||||||
firewall_driver = nova.virt.firewall.NoopFirewallDriver
|
firewall_driver = nova.virt.firewall.NoopFirewallDriver
|
||||||
enabled_apis=osapi_compute,metadata
|
enabled_apis=osapi_compute,metadata
|
||||||
security_group_api=neutron
|
cpu_allocation_ratio = 4
|
||||||
|
|
||||||
[neutron]
|
[neutron]
|
||||||
url = http://$NEUTRON_CONTROLLER_HOST:9696
|
url = http://$NEUTRON_CONTROLLER_HOST:9696
|
||||||
|
8
openstack_client/.gitignore
vendored
8
openstack_client/.gitignore
vendored
@@ -1,8 +0,0 @@
|
|||||||
# ---> Vim
|
|
||||||
[._]*.s[a-w][a-z]
|
|
||||||
[._]s[a-w][a-z]
|
|
||||||
*.un~
|
|
||||||
Session.vim
|
|
||||||
.netrwhist
|
|
||||||
*~
|
|
||||||
|
|
Reference in New Issue
Block a user