summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rw-r--r--HACKING.rst2
-rw-r--r--README.rst83
-rw-r--r--contrib/dev/vagrant/Vagrantfile252
-rw-r--r--contrib/dev/vagrant/Vagrantfile.custom.example92
-rw-r--r--contrib/dev/vagrant/bootstrap.sh226
-rw-r--r--contrib/dev/vagrant/newest_dhcp_lease.py134
-rw-r--r--contrib/template-override/opendaylight-template-overrides.j22
-rw-r--r--doc/CONTRIBUTING.rst4
-rw-r--r--doc/image-building.rst4
-rw-r--r--doc/index.rst6
-rw-r--r--doc/running-tests.rst8
-rw-r--r--doc/template-override/opendaylight-source.rst8
-rw-r--r--docker/base/MariaDB.repo2
-rw-r--r--docker/base/start.sh7
-rw-r--r--docker/ceilometer/ceilometer-ipmi/Dockerfile.j222
-rw-r--r--docker/cron/Dockerfile.j23
-rw-r--r--docker/cron/extend_start.sh7
-rw-r--r--docker/etcd/extend_start.sh5
-rw-r--r--docker/ironic/ironic-api/Dockerfile.j236
-rw-r--r--docker/ironic/ironic-api/extend_start.sh13
-rw-r--r--docker/keepalived/extend_start.sh7
-rw-r--r--docker/keystone/keystone-ssh/extend_start.sh4
-rw-r--r--docker/keystone/keystone/Dockerfile.j23
-rw-r--r--docker/kolla-toolbox/Dockerfile.j21
-rw-r--r--docker/kuryr/kuryr-base/Dockerfile.j27
-rw-r--r--docker/kuryr/kuryr-base/extend_start.sh6
-rw-r--r--docker/kuryr/kuryr-libnetwork/Dockerfile.j216
-rw-r--r--docker/macros.j22
-rw-r--r--docker/manila/manila-data/Dockerfile.j27
-rw-r--r--docker/neutron/neutron-server-opendaylight/Dockerfile.j235
-rw-r--r--docker/neutron/neutron-server/Dockerfile.j222
-rw-r--r--docker/nova/nova-compute/Dockerfile.j221
-rw-r--r--docker/nova/nova-ssh/extend_start.sh4
-rw-r--r--docker/opendaylight/Dockerfile.j22
-rw-r--r--docker/opendaylight/opendaylight.repo2
-rw-r--r--docker/ovn/ovn-base/Dockerfile.j226
-rw-r--r--docker/ovn/ovn-base/extend_start.sh10
-rw-r--r--docker/ovn/ovn-controller/Dockerfile.j222
-rw-r--r--docker/ovn/ovn-nb-db-server/Dockerfile.j227
-rw-r--r--docker/ovn/ovn-nb-db-server/extend_start.sh6
-rwxr-xr-xdocker/ovn/ovn-nb-db-server/start_nb_db_server.sh11
-rw-r--r--docker/ovn/ovn-northd/Dockerfile.j222
-rw-r--r--docker/ovn/ovn-sb-db-server/Dockerfile.j227
-rw-r--r--docker/ovn/ovn-sb-db-server/extend_start.sh6
-rwxr-xr-xdocker/ovn/ovn-sb-db-server/start_sb_db_server.sh11
-rw-r--r--docker/rabbitmq/extend_start.sh11
-rw-r--r--docker/sahara/sahara-engine/Dockerfile.j210
-rw-r--r--docker/skydive/skydive-agent/Dockerfile.j27
-rw-r--r--docker/skydive/skydive-analyzer/Dockerfile.j28
-rw-r--r--docker/skydive/skydive-base/Dockerfile.j220
-rw-r--r--docker/swift/swift-object-expirer/Dockerfile.j23
-rw-r--r--docker/swift/swift-proxy-server/Dockerfile.j218
-rwxr-xr-xkolla/common/config.py29
-rw-r--r--kolla/common/task.py5
-rw-r--r--kolla/exception.py2
-rwxr-xr-xkolla/image/build.py24
-rw-r--r--kolla/template/methods.py2
-rw-r--r--releasenotes/notes/add-ceilometer-agent-ipmi-container-aa498b90c3d2f326.yaml3
-rw-r--r--releasenotes/notes/add-neutron-server-opendaylight-bf8407e0b91059c4.yaml3
-rw-r--r--releasenotes/notes/add-openvswitch-ovn-2855384c9720161e.yaml3
-rw-r--r--releasenotes/notes/add-skydive-52c3fb964fe6cc1b.yaml7
-rw-r--r--releasenotes/notes/dockerfile-customizations-26981ebefe3b710b.yaml2
-rw-r--r--releasenotes/notes/vagrant-dev-env-moved-8328674713020dda.yaml4
-rw-r--r--requirements.txt2
-rw-r--r--setup.cfg2
-rw-r--r--specs/containerize-openstack.rst2
-rw-r--r--test-requirements.txt4
-rw-r--r--tests/test_build.py2
-rwxr-xr-xtools/deploy_aio.sh13
70 files changed, 530 insertions, 886 deletions
diff --git a/.gitignore b/.gitignore
index 2495270..61cb32a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,13 +32,6 @@ etc/kolla/kolla-build.conf
32.coverage 32.coverage
33cover/ 33cover/
34 34
35# Files generated by Vagrant
36dev/vagrant/Vagrantfile.custom
37dev/vagrant/vagrantkey
38dev/vagrant/vagrantkey.pub
39dev/vagrant/storage/
40.vagrant/
41
42# Files generated by JetBrains 35# Files generated by JetBrains
43.idea/ 36.idea/
44 37
diff --git a/HACKING.rst b/HACKING.rst
index 7d5ef11..f1a2436 100644
--- a/HACKING.rst
+++ b/HACKING.rst
@@ -2,7 +2,7 @@ Kolla Style Commandments
2============================ 2============================
3 3
4- Step 1: Read the OpenStack Style Commandments 4- Step 1: Read the OpenStack Style Commandments
5 http://docs.openstack.org/developer/hacking/ 5 https://docs.openstack.org/developer/hacking/
6- Step 2: Read on 6- Step 2: Read on
7 7
8 8
diff --git a/README.rst b/README.rst
index 0e8757a..3cd2341 100644
--- a/README.rst
+++ b/README.rst
@@ -35,7 +35,7 @@ Getting Started
35=============== 35===============
36 36
37Learn about Kolla by reading the documentation online 37Learn about Kolla by reading the documentation online
38`docs.openstack.org <http://docs.openstack.org/developer/kolla/>`__. 38`docs.openstack.org <https://docs.openstack.org/developer/kolla/>`__.
39 39
40Get started by reading the `Kolla Ansible Developer 40Get started by reading the `Kolla Ansible Developer
41Quickstart <https://docs.openstack.org/developer/kolla-ansible/quickstart.html>`__ 41Quickstart <https://docs.openstack.org/developer/kolla-ansible/quickstart.html>`__
@@ -60,7 +60,7 @@ The `Docker images <https://docs.docker.com/engine/userguide/storagedriver/
60imagesandcontainers/>`__ 60imagesandcontainers/>`__
61are built by the Kolla project maintainers. A detailed process for 61are built by the Kolla project maintainers. A detailed process for
62contributing to the images can be found in the `image building 62contributing to the images can be found in the `image building
63guide <http://docs.openstack.org/developer/kolla/image-building.html>`__. 63guide <https://docs.openstack.org/developer/kolla/image-building.html>`__.
64 64
65The Kolla developers build images in the `kolla` namespace for every tagged 65The Kolla developers build images in the `kolla` namespace for every tagged
66release. 66release.
@@ -75,44 +75,46 @@ OpenStack services
75 75
76Kolla provides images to deploy the following OpenStack projects: 76Kolla provides images to deploy the following OpenStack projects:
77 77
78- `Aodh <http://docs.openstack.org/developer/aodh/>`__ 78- `Aodh <https://docs.openstack.org/developer/aodh/>`__
79- `Barbican <http://docs.openstack.org/developer/barbican/>`__ 79- `Barbican <https://docs.openstack.org/developer/barbican/>`__
80- `Bifrost <http://docs.openstack.org/developer/bifrost/>`__ 80- `Bifrost <https://docs.openstack.org/developer/bifrost/>`__
81- `Ceilometer <http://docs.openstack.org/developer/ceilometer/>`__ 81- `Ceilometer <https://docs.openstack.org/developer/ceilometer/>`__
82- `Cinder <http://docs.openstack.org/developer/cinder/>`__ 82- `Cinder <https://docs.openstack.org/developer/cinder/>`__
83- `CloudKitty <http://docs.openstack.org/developer/cloudkitty/>`__ 83- `CloudKitty <https://docs.openstack.org/developer/cloudkitty/>`__
84- `Congress <http://docs.openstack.org/developer/congress/>`__ 84- `Congress <https://docs.openstack.org/developer/congress/>`__
85- `Designate <http://docs.openstack.org/developer/designate/>`__ 85- `Designate <https://docs.openstack.org/developer/designate/>`__
86- `Dragonflow <https://docs.openstack.org/developer/dragonflow/>`__
86- `Freezer <https://wiki.openstack.org/wiki/Freezer-docs>`__ 87- `Freezer <https://wiki.openstack.org/wiki/Freezer-docs>`__
87- `Glance <http://docs.openstack.org/developer/glance/>`__ 88- `Glance <https://docs.openstack.org/developer/glance/>`__
88- `Heat <http://docs.openstack.org/developer/heat/>`__ 89- `Heat <https://docs.openstack.org/developer/heat/>`__
89- `Horizon <http://docs.openstack.org/developer/horizon/>`__ 90- `Horizon <https://docs.openstack.org/developer/horizon/>`__
90- `Ironic <http://docs.openstack.org/developer/ironic/>`__ 91- `Ironic <https://docs.openstack.org/developer/ironic/>`__
91- `Karbor <http://docs.openstack.org/developer/karbor/>`__ 92- `Karbor <https://docs.openstack.org/developer/karbor/>`__
92- `Keystone <http://docs.openstack.org/developer/keystone/>`__ 93- `Keystone <https://docs.openstack.org/developer/keystone/>`__
93- `Kuryr <http://docs.openstack.org/developer/kuryr/>`__ 94- `Kuryr <https://docs.openstack.org/developer/kuryr/>`__
94- `Magnum <http://docs.openstack.org/developer/magnum/>`__ 95- `Magnum <https://docs.openstack.org/developer/magnum/>`__
95- `Manila <http://docs.openstack.org/developer/manila/>`__ 96- `Manila <https://docs.openstack.org/developer/manila/>`__
96- `Mistral <http://docs.openstack.org/developer/mistral/>`__ 97- `Mistral <https://docs.openstack.org/developer/mistral/>`__
97- `Monasca <http://wiki.openstack.org/wiki/monasca>`__ 98- `Monasca <https://wiki.openstack.org/wiki/monasca>`__
98- `Murano <http://docs.openstack.org/developer/murano/>`__ 99- `Murano <https://docs.openstack.org/developer/murano/>`__
99- `Neutron <http://docs.openstack.org/developer/neutron/>`__ 100- `Neutron <https://docs.openstack.org/developer/neutron/>`__
100- `Nova <http://docs.openstack.org/developer/nova/>`__ 101- `Nova <https://docs.openstack.org/developer/nova/>`__
101- `Octavia <http://docs.openstack.org/developer/octavia/>`__ 102- `Octavia <https://docs.openstack.org/developer/octavia/>`__
102- `Panko <http://docs.openstack.org/developer/panko/>`__ 103- `Panko <https://docs.openstack.org/developer/panko/>`__
103- `Rally <http://docs.openstack.org/developer/rally/>`__ 104- `Rally <https://docs.openstack.org/developer/rally/>`__
104- `Sahara <http://docs.openstack.org/developer/sahara/>`__ 105- `Sahara <https://docs.openstack.org/developer/sahara/>`__
105- `Searchlight <http://docs.openstack.org/developer/searchlight/>`__ 106- `Searchlight <https://docs.openstack.org/developer/searchlight/>`__
106- `Senlin <http://docs.openstack.org/developer/senlin/>`__ 107- `Senlin <https://docs.openstack.org/developer/senlin/>`__
107- `Solum <http://docs.openstack.org/developer/solum/>`__ 108- `Solum <https://docs.openstack.org/developer/solum/>`__
108- `Swift <http://docs.openstack.org/developer/swift/>`__ 109- `Swift <https://docs.openstack.org/developer/swift/>`__
109- `Tacker <http://docs.openstack.org/developer/tacker/>`__ 110- `Tacker <https://docs.openstack.org/developer/tacker/>`__
110- `Tempest <http://docs.openstack.org/developer/tempest/>`__ 111- `Tempest <https://docs.openstack.org/developer/tempest/>`__
111- `Trove <http://docs.openstack.org/developer/trove/>`__ 112- `Trove <https://docs.openstack.org/developer/trove/>`__
113- `Vitrage <https://docs.openstack.org/developer/vitrage/>`__
112- `Vmtp <http://vmtp.readthedocs.io/en/latest/>`__ 114- `Vmtp <http://vmtp.readthedocs.io/en/latest/>`__
113- `Watcher <http://docs.openstack.org/developer/watcher/>`__ 115- `Watcher <https://docs.openstack.org/developer/watcher/>`__
114- `Zaqar <http://docs.openstack.org/developer/zaqar/>`__ 116- `Zaqar <https://docs.openstack.org/developer/zaqar/>`__
115- `Zun <http://wiki.openstack.org/wiki/zun>`__ 117- `Zun <https://wiki.openstack.org/wiki/zun>`__
116 118
117Infrastructure components 119Infrastructure components
118------------------------- 120-------------------------
@@ -152,8 +154,7 @@ Kolla provides images to deploy the following infrastructure components:
152Directories 154Directories
153=========== 155===========
154 156
155- ``contrib`` - Contains demos scenarios for Heat and Murano and a development 157- ``contrib`` - Contains demos scenarios for Heat and Murano.
156 environment for Vagrant.
157- ``doc`` - Contains documentation. 158- ``doc`` - Contains documentation.
158- ``docker`` - Contains jinja2 templates for the Docker build system. 159- ``docker`` - Contains jinja2 templates for the Docker build system.
159- ``etc`` - Contains a reference etc directory structure which requires 160- ``etc`` - Contains a reference etc directory structure which requires
@@ -169,7 +170,7 @@ Getting Involved
169 170
170Need a feature? Find a bug? Let us know! Contributions are much 171Need a feature? Find a bug? Let us know! Contributions are much
171appreciated and should follow the standard `Gerrit 172appreciated and should follow the standard `Gerrit
172workflow <http://docs.openstack.org/infra/manual/developers.html>`__. 173workflow <https://docs.openstack.org/infra/manual/developers.html>`__.
173 174
174- We communicate using the #openstack-kolla irc channel. 175- We communicate using the #openstack-kolla irc channel.
175- File bugs, blueprints, track releases, etc on 176- File bugs, blueprints, track releases, etc on
diff --git a/contrib/dev/vagrant/Vagrantfile b/contrib/dev/vagrant/Vagrantfile
deleted file mode 100644
index a667aa0..0000000
--- a/contrib/dev/vagrant/Vagrantfile
+++ /dev/null
@@ -1,252 +0,0 @@
1# -*- mode: ruby -*-
2# vi: set ft=ruby :
3
4require "ipaddr"
5
6# Check for required plugin(s)
7['vagrant-hostmanager'].each do |plugin|
8 unless Vagrant.has_plugin?(plugin)
9 raise "#{plugin} plugin not found. Please install it via 'vagrant plugin install #{plugin}'"
10 end
11end
12
13class VagrantConfigMissing < StandardError
14end
15
16vagrant_dir = File.expand_path(File.dirname(__FILE__))
17
18# Vagrantfile.custom contains user customization for the Vagrantfile
19# You shouldn't have to edit the Vagrantfile, ever.
20if File.exists?(File.join(vagrant_dir, 'Vagrantfile.custom'))
21 eval(IO.read(File.join(vagrant_dir, 'Vagrantfile.custom')), binding)
22end
23
24# Either libvirt or virtualbox
25PROVIDER ||= "libvirt"
26# Either centos or ubuntu
27DISTRO ||= "centos"
28
29# The libvirt graphics_ip used for each guest. Only applies if PROVIDER
30# is libvirt.
31GRAPHICSIP ||= "127.0.0.1"
32
33# The bootstrap.sh provision_script requires CentOS 7 or Ubuntu 15.10.
34# Provisioning other boxes than the default ones may therefore
35# require changes to bootstrap.sh.
36PROVISION_SCRIPT ||= "bootstrap.sh"
37
38PROVIDER_DEFAULTS ||= {
39 libvirt: {
40 centos: {
41 base_image: "centos/7",
42 bridge_interface: "virbr0",
43 vagrant_shared_folder: "/home/vagrant/sync",
44 sync_method: "nfs",
45 kolla_path: "/home/vagrant/kolla"
46 }
47 },
48 virtualbox: {
49 centos: {
50 base_image: "puppetlabs/centos-7.0-64-puppet",
51 bridge_interface: "wlp3s0b1",
52 vagrant_shared_folder: "/home/vagrant/sync",
53 sync_method: "virtualbox",
54 kolla_path: "/home/vagrant/kolla"
55 },
56 ubuntu: {
57 base_image: "ubuntu/wily64",
58 bridge_interface: "wlp3s0b1",
59 vagrant_shared_folder: "/home/vagrant/sync",
60 sync_method: "virtualbox",
61 kolla_path: "/home/vagrant/kolla"
62 }
63 }
64}
65
66# Whether the host network adapter is Wi-Fi.
67# On VirtualBox, the user must first manually create a NAT-Network
68# named "OSNetwork". The default network CIDR must be changed.
69# The Neutron external interface will be connected to this Network.
70WIFI = false unless self.class.const_defined?(:WIFI)
71
72# Whether to do Multi-node or All-in-One deployment
73MULTINODE = false unless self.class.const_defined?(:MULTINODE)
74
75# The following is only used when deploying in Multi-nodes
76NUMBER_OF_CONTROL_NODES ||= 3
77NUMBER_OF_COMPUTE_NODES ||= 1
78NUMBER_OF_STORAGE_NODES ||= 1
79NUMBER_OF_NETWORK_NODES ||= 1
80
81NODE_SETTINGS ||= {
82 aio: {
83 cpus: 4,
84 memory: 4096
85 },
86 operator: {
87 cpus: 1,
88 memory: 1024
89 },
90 control: {
91 cpus: 1,
92 memory: 2048
93 },
94 compute: {
95 cpus: 1,
96 memory: 1024
97 },
98 storage: {
99 cpus: 1,
100 memory: 1024
101 },
102 network: {
103 cpus: 1,
104 memory: 1024
105 }
106}
107
108# Configure a new SSH key and config so the operator is able to connect with
109# the other cluster nodes.
110unless File.file?(File.join(vagrant_dir, 'vagrantkey'))
111 system("ssh-keygen -f #{File.join(vagrant_dir, 'vagrantkey')} -N '' -C this-is-vagrant")
112end
113
114def get_default(setting)
115 PROVIDER_DEFAULTS[PROVIDER.to_sym][DISTRO.to_sym][setting]
116rescue
117 raise VagrantConfigMissing,
118 "Missing configuration for PROVIDER_DEFAULTS[#{PROVIDER}][#{DISTRO}][#{setting}]"
119end
120
121def get_setting(node, setting)
122 NODE_SETTINGS[node][setting]
123rescue
124 raise VagrantConfigMissing,
125 "Missing configuration for NODE_SETTINGS[#{node}][#{setting}]"
126end
127
128def configure_wifi_vbox_networking(vm)
129 # Even if adapters 1 & 2 don't need to be modified, if the order is to be
130 # maintained, some modification has to be done to them. This will maintain
131 # the association inside the guest OS: NIC1 -> eth0, NIC2 -> eth1, NIC3 ->
132 # eht2. The modifications for adapters 1 & 2 only change optional properties.
133 # Adapter 3 is enabled and connected to the NAT-Network named "OSNetwork",
134 # while also changing its optional properties. Since adapter 3 is used by
135 # Neutron for the external network, promiscuous mode is set to "allow-all".
136 # Also, use virtio as the adapter type, for better performance.
137 vm.customize ["modifyvm", :id, "--nictype1", "virtio"]
138 vm.customize ["modifyvm", :id, "--cableconnected1", "on"]
139 vm.customize ["modifyvm", :id, "--nicpromisc2", "deny"]
140 vm.customize ["modifyvm", :id, "--nictype2", "virtio"]
141 vm.customize ["modifyvm", :id, "--cableconnected2", "on"]
142 vm.customize ["modifyvm", :id, "--nic3", "natnetwork"]
143 vm.customize ["modifyvm", :id, "--nat-network3", "OSNetwork"]
144 vm.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"]
145 vm.customize ["modifyvm", :id, "--nictype3", "virtio"]
146 vm.customize ["modifyvm", :id, "--cableconnected3", "on"]
147end
148
149def configure_wifi_if_enabled(vm)
150 if WIFI
151 case PROVIDER
152 when "virtualbox"
153 configure_wifi_vbox_networking(vm)
154# TODO(lucian-serb): Configure networking on Wi-Fi for other hypervisors.
155# when "libvirt"
156# configure_wifi_libvirt_networking(vm)
157 end
158 end
159end
160
161Vagrant.configure(2) do |config|
162 config.vm.box = get_default(:base_image)
163
164 # Next to the hostonly NAT-network there is a host-only network with all
165 # nodes attached. Plus, each node receives a 3rd adapter connected to the
166 # outside public network.
167 config.vm.network "private_network", type: "dhcp"
168 # On VirtualBox hosts with Wi-Fi, do not create a public bridged interface.
169 # A NAT-Network will be used instead.
170 # TODO(lucian-serb): Do the same for other hypervisors as well?
171 unless PROVIDER == "virtualbox" && WIFI
172 config.vm.network "public_network", dev: get_default(:bridge_interface), mode: 'bridge', type: 'bridge'
173 end
174
175 my_privatekey = File.read(File.join(vagrant_dir, "vagrantkey"))
176 my_publickey = File.read(File.join(vagrant_dir, "vagrantkey.pub"))
177
178 config.vm.provision :shell, inline: <<-EOS
179 mkdir -p /root/.ssh
180 echo '#{my_privatekey}' > /root/.ssh/id_rsa
181 chmod 600 /root/.ssh/id_rsa
182 echo '#{my_publickey}' > /root/.ssh/authorized_keys
183 chmod 600 /root/.ssh/authorized_keys
184 echo '#{my_publickey}' > /root/.ssh/id_rsa.pub
185 chmod 644 /root/.ssh/id_rsa.pub
186 mkdir -p /home/vagrant/.ssh
187 echo '#{my_privatekey}' >> /home/vagrant/.ssh/id_rsa
188 chmod 600 /home/vagrant/.ssh/*
189 echo 'Host *' > ~vagrant/.ssh/config
190 echo StrictHostKeyChecking no >> ~vagrant/.ssh/config
191 chown -R vagrant: /home/vagrant/.ssh
192 EOS
193
194 config.hostmanager.enabled = true
195 # Make sure hostmanager picks IP address of eth1
196 config.hostmanager.ip_resolver = proc do |vm, resolving_vm|
197 case PROVIDER
198 when "libvirt"
199 if vm.name
200 `python newest_dhcp_lease.py #{vm.name}`.chop
201 end
202 when "virtualbox"
203 if vm.id
204 `VBoxManage guestproperty get #{vm.id} "/VirtualBox/GuestInfo/Net/1/V4/IP"`.split()[1]
205 end
206 end
207 end
208
209 # The operator controls the deployment
210 config.vm.define "operator", primary: true do |admin|
211 admin.vm.hostname = "operator.local"
212 admin.vm.provision :shell, path: PROVISION_SCRIPT, args: "operator #{MULTINODE ? 'multinode' : 'aio'} #{get_default(:kolla_path)}"
213 admin.vm.synced_folder File.join(vagrant_dir, '..', '..', '..'), get_default(:kolla_path), create:"True", type: get_default(:sync_method)
214 admin.vm.synced_folder File.join(vagrant_dir, 'storage', 'operator'), "/data/host", create:"True", type: get_default(:sync_method)
215 admin.vm.synced_folder File.join(vagrant_dir, 'storage', 'shared'), "/data/shared", create:"True", type: get_default(:sync_method)
216 admin.vm.synced_folder ".", get_default(:vagrant_shared_folder), disabled: true
217 admin.vm.provider PROVIDER do |vm|
218 vm.memory = MULTINODE ? get_setting(:operator, :memory) : get_setting(:aio, :memory)
219 vm.cpus = MULTINODE ? get_setting(:operator, :cpus) : get_setting(:aio, :cpus)
220 if PROVIDER == "libvirt"
221 vm.graphics_ip = GRAPHICSIP
222 end
223 configure_wifi_if_enabled(vm)
224 end
225 admin.hostmanager.aliases = "operator"
226 end
227
228 if MULTINODE
229 ['compute', 'storage', 'network', 'control'].each do |node_type|
230 (1..self.class.const_get("NUMBER_OF_#{node_type.upcase}_NODES")).each do |i|
231 hostname = "#{node_type}0#{i}"
232 config.vm.define hostname do |node|
233 node.vm.hostname = "#{hostname}.local"
234 node.vm.provision :shell, path: PROVISION_SCRIPT, args: "#{hostname} multinode #{get_default(:kolla_path)}"
235 node.vm.synced_folder File.join(vagrant_dir, 'storage', node_type), "/data/host", create:"True", type: get_default(:sync_method)
236 node.vm.synced_folder File.join(vagrant_dir, 'storage', 'shared'), "/data/shared", create:"True", type: get_default(:sync_method)
237 node.vm.synced_folder ".", get_default(:vagrant_shared_folder), disabled: true
238 node.vm.provider PROVIDER do |vm|
239 vm.memory = get_setting(node_type.to_sym, :memory)
240 vm.cpus = get_setting(node_type.to_sym, :cpus)
241 if PROVIDER == "libvirt"
242 vm.graphics_ip = GRAPHICSIP
243 end
244 configure_wifi_if_enabled(vm)
245 end
246 node.hostmanager.aliases = hostname
247 end
248 end
249 end
250 end
251
252end
diff --git a/contrib/dev/vagrant/Vagrantfile.custom.example b/contrib/dev/vagrant/Vagrantfile.custom.example
deleted file mode 100644
index 09af72f..0000000
--- a/contrib/dev/vagrant/Vagrantfile.custom.example
+++ /dev/null
@@ -1,92 +0,0 @@
1# -*- mode: ruby -*-
2# vi: set ft=ruby :
3
4# This file is an example of Vagrant configuration.
5# Copy it to Vagrantfile.custom and configure it to your liking to customize
6# the Vagrant deployment. The Vagrantfile.custom file is sourced by the
7# Vagrantfile, it has to be valid ruby code.
8
9# Either libvirt or virtualbox
10# PROVIDER = "libvirt"
11
12# Either centos or ubuntu
13# DISTRO = "centos"
14
15# The libvirt graphics_ip used for each guest. Only applies if PROVIDER
16# is libvirt.
17# GRAPHICSIP = "127.0.0.1"
18
19# The bootstrap.sh provision_script requires CentOS 7 or Ubuntu 15.10.
20# Provisioning other boxes than the default ones may therefore
21# require changes to bootstrap.sh.
22# PROVISION_SCRIPT = "bootstrap.sh"
23
24# PROVIDER_DEFAULTS = {
25# libvirt: {
26# centos: {
27# base_image: "centos/7",
28# bridge_interface: "virbr0",
29# vagrant_shared_folder: "/home/vagrant/sync",
30# sync_method: "nfs",
31# kolla_path: "/home/vagrant/kolla"
32# }
33# },
34# virtualbox: {
35# centos: {
36# base_image: "puppetlabs/centos-7.0-64-puppet",
37# bridge_interface: "wlp3s0b1",
38# vagrant_shared_folder: "/home/vagrant/sync",
39# sync_method: "virtualbox",
40# kolla_path: "/home/vagrant/kolla"
41# },
42# ubuntu: {
43# base_image: "ubuntu/wily64",
44# bridge_interface: "wlp3s0b1",
45# vagrant_shared_folder: "/home/vagrant/sync",
46# sync_method: "virtualbox",
47# kolla_path: "/home/vagrant/kolla"
48# }
49# }
50# }
51
52# Whether the host network adapter is Wi-Fi.
53# On VirtualBox, the user must first manually create a NAT-Network
54# named OSNetwork. The default network CIDR must be changed.
55# The Neutron external interface will be connected to this Network.
56# WIFI = false
57
58# Whether to do Multi-node or All-in-One deployment
59# MULTINODE = false
60
61# The following is only used when deploying in Multi-nodes
62# NUMBER_OF_CONTROL_NODES = 3
63# NUMBER_OF_COMPUTE_NODES = 1
64# NUMBER_OF_STORAGE_NODES = 1
65# NUMBER_OF_NETWORK_NODES = 1
66
67# NODE_SETTINGS = {
68# aio: {
69# cpus: 4,
70# memory: 4096
71# },
72# operator: {
73# cpus: 1,
74# memory: 1024
75# },
76# control: {
77# cpus: 1,
78# memory: 2048
79# },
80# compute: {
81# cpus: 1,
82# memory: 1024
83# },
84# storage: {
85# cpus: 1,
86# memory: 1024
87# },
88# network: {
89# cpus: 1,
90# memory: 1024
91# }
92# }
diff --git a/contrib/dev/vagrant/bootstrap.sh b/contrib/dev/vagrant/bootstrap.sh
deleted file mode 100644
index a142fb8..0000000
--- a/contrib/dev/vagrant/bootstrap.sh
+++ /dev/null
@@ -1,226 +0,0 @@
1#!/usr/bin/env bash
2#
3# Bootstrap script to configure all nodes.
4#
5# This script is intended to be used by vagrant to provision nodes.
6# To use it, set it as 'PROVISION_SCRIPT' inside your Vagrantfile.custom.
7# You can use Vagrantfile.custom.example as a template for this.
8
9VM=$1
10MODE=$2
11KOLLA_PATH=$3
12
13export http_proxy=
14export https_proxy=
15
16if [ "$MODE" == 'aio' ]; then
17 # Run registry on port 4000 since it may collide with keystone when doing AIO
18 REGISTRY_PORT=4000
19else
20 REGISTRY_PORT=5000
21fi
22REGISTRY_URL="operator.local"
23REGISTRY=${REGISTRY_URL}:${REGISTRY_PORT}
24ADMIN_PROTOCOL="http"
25
26function _ensure_lsb_release {
27 if type lsb_release >/dev/null 2>&1; then
28 return
29 fi
30
31 if type apt-get >/dev/null 2>&1; then
32 apt-get -y install lsb-release
33 elif type yum >/dev/null 2>&1; then
34 yum -y install redhat-lsb-core
35 fi
36}
37
38function _is_distro {
39 if [[ -z "$DISTRO" ]]; then
40 _ensure_lsb_release
41 DISTRO=$(lsb_release -si)
42 fi
43
44 [[ "$DISTRO" == "$1" ]]
45}
46
47function is_ubuntu {
48 _is_distro "Ubuntu"
49}
50
51function is_centos {
52 _is_distro "CentOS"
53}
54
55# Install common packages and do some prepwork.
56function prep_work {
57 if [[ "$(systemctl is-enabled firewalld)" == "enabled" ]]; then
58 systemctl stop firewalld
59 systemctl disable firewalld
60 fi
61
62 # This removes the fqdn from /etc/hosts's 127.0.0.1. This name.local will
63 # resolve to the public IP instead of localhost.
64 sed -i -r "s,^127\.0\.0\.1\s+.*,127\.0\.0\.1 localhost localhost.localdomain localhost4 localhost4.localdomain4," /etc/hosts
65
66 if is_centos; then
67 yum -y install epel-release
68 rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
69 yum -y install MySQL-python vim-enhanced python-pip python-devel gcc openssl-devel libffi-devel libxml2-devel libxslt-devel
70 elif is_ubuntu; then
71 apt-get update
72 apt-get -y install python-mysqldb python-pip python-dev build-essential libssl-dev libffi-dev libxml2-dev libxslt-dev
73 else
74 echo "Unsupported Distro: $DISTRO" 1>&2
75 exit 1
76 fi
77
78 pip install --upgrade docker-py
79}
80
81# Do some cleanup after the installation of kolla
82function cleanup {
83 if is_centos; then
84 yum clean all
85 elif is_ubuntu; then
86 apt-get clean
87 else
88 echo "Unsupported Distro: $DISTRO" 1>&2
89 exit 1
90 fi
91}
92
93# Install and configure a quick&dirty docker daemon.
94function install_docker {
95 if is_centos; then
96 cat >/etc/yum.repos.d/docker.repo <<-EOF
97[dockerrepo]
98name=Docker Repository
99baseurl=https://yum.dockerproject.org/repo/main/centos/7
100enabled=1
101gpgcheck=1
102gpgkey=https://yum.dockerproject.org/gpg
103EOF
104 # Also upgrade device-mapper here because of:
105 # https://github.com/docker/docker/issues/12108
106 # Upgrade lvm2 to get device-mapper installed
107 yum -y install docker-engine lvm2 device-mapper
108
109 # Despite it shipping with /etc/sysconfig/docker, Docker is not configured to
110 # load it from it's service file.
111 sed -i -r "s|(ExecStart)=(.+)|\1=/usr/bin/docker daemon --insecure-registry ${REGISTRY} --registry-mirror=http://${REGISTRY}|" /usr/lib/systemd/system/docker.service
112 sed -i 's|^MountFlags=.*|MountFlags=shared|' /usr/lib/systemd/system/docker.service
113
114 usermod -aG docker vagrant
115 elif is_ubuntu; then
116 apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
117 echo "deb https://apt.dockerproject.org/repo ubuntu-wily main" > /etc/apt/sources.list.d/docker.list
118 apt-get update
119 apt-get -y install docker-engine
120 sed -i -r "s|(ExecStart)=(.+)|\1=/usr/bin/docker daemon --insecure-registry ${REGISTRY} --registry-mirror=http://${REGISTRY}|" /lib/systemd/system/docker.service
121 else
122 echo "Unsupported Distro: $DISTRO" 1>&2
123 exit 1
124 fi
125
126 if [[ "${http_proxy}" != "" ]]; then
127 mkdir -p /etc/systemd/system/docker.service.d
128 cat >/etc/systemd/system/docker.service.d/http-proxy.conf <<-EOF
129[Service]
130Environment="HTTP_PROXY=${http_proxy}" "HTTPS_PROXY=${https_proxy}" "NO_PROXY=localhost,127.0.0.1,${REGISTRY_URL}"
131EOF
132
133 if [[ "$(grep http_ /etc/bashrc)" == "" ]]; then
134 echo "export http_proxy=${http_proxy}" >> /etc/bashrc
135 echo "export https_proxy=${https_proxy}" >> /etc/bashrc
136 fi
137 fi
138
139 systemctl daemon-reload
140 systemctl enable docker
141 systemctl start docker
142}
143
144function configure_kolla {
145 # Use local docker registry
146 sed -i -r "s,^[# ]*namespace *=.+$,namespace = ${REGISTRY}/lokolla," /etc/kolla/kolla-build.conf
147 sed -i -r "s,^[# ]*push *=.+$,push = True," /etc/kolla/kolla-build.conf
148 sed -i -r "s,^[# ]*docker_registry:.+$,docker_registry: \"${REGISTRY}\"," /etc/kolla/globals.yml
149 sed -i -r "s,^[# ]*docker_namespace:.+$,docker_namespace: \"lokolla\"," /etc/kolla/globals.yml
150 sed -i -r "s,^[# ]*docker_insecure_registry:.+$,docker_insecure_registry: \"True\"," /etc/kolla/globals.yml
151 # Set network interfaces
152 sed -i -r "s,^[# ]*network_interface:.+$,network_interface: \"eth1\"," /etc/kolla/globals.yml
153 sed -i -r "s,^[# ]*neutron_external_interface:.+$,neutron_external_interface: \"eth2\"," /etc/kolla/globals.yml
154 # Set VIP address to be on the vagrant private network
155 sed -i -r "s,^[# ]*kolla_internal_vip_address:.+$,kolla_internal_vip_address: \"172.28.128.254\"," /etc/kolla/globals.yml
156}
157
158# Configure the operator node and install some additional packages.
159function configure_operator {
160 if is_centos; then
161 yum -y install git mariadb
162 elif is_ubuntu; then
163 apt-get -y install git mariadb-client selinux-utils
164 else
165 echo "Unsupported Distro: $DISTRO" 1>&2
166 exit 1
167 fi
168
169 pip install --upgrade "ansible>=2" python-openstackclient python-neutronclient tox
170
171 pip install ${KOLLA_PATH}
172
173 # Set selinux to permissive
174 if [[ "$(getenforce)" == "Enforcing" ]]; then
175 sed -i -r "s,^SELINUX=.+$,SELINUX=permissive," /etc/selinux/config
176 setenforce permissive
177 fi
178
179 tox -c ${KOLLA_PATH}/tox.ini -e genconfig
180 cp -r ${KOLLA_PATH}/etc/kolla/ /etc/kolla
181 ${KOLLA_PATH}/tools/generate_passwords.py
182 mkdir -p /usr/share/kolla
183 chown -R vagrant: /etc/kolla /usr/share/kolla
184
185 configure_kolla
186
187 # Make sure Ansible uses scp.
188 cat > ~vagrant/.ansible.cfg <<EOF
189[defaults]
190forks=100
191remote_user = root
192
193[ssh_connection]
194scp_if_ssh=True
195EOF
196 chown vagrant: ~vagrant/.ansible.cfg
197
198 mkdir -p /etc/kolla/config/nova/
199 cat > /etc/kolla/config/nova/nova-compute.conf <<EOF
200[libvirt]
201virt_type=qemu
202EOF
203
204 # Launch a local registry (and mirror) to speed up pulling images.
205 if [[ ! $(docker ps -a -q -f name=registry) ]]; then
206 docker run -d \
207 --name registry \
208 --restart=always \
209 -p ${REGISTRY_PORT}:5000 \
210 -e STANDALONE=True \
211 -e MIRROR_SOURCE=https://registry-1.docker.io \
212 -e MIRROR_SOURCE_INDEX=https://index.docker.io \
213 -e STORAGE_PATH=/var/lib/registry \
214 -v /data/host/registry-storage:/var/lib/registry \
215 registry:2
216 fi
217}
218
219prep_work
220install_docker
221
222if [[ "$VM" == "operator" ]]; then
223 configure_operator
224fi
225
226cleanup
diff --git a/contrib/dev/vagrant/newest_dhcp_lease.py b/contrib/dev/vagrant/newest_dhcp_lease.py
deleted file mode 100644
index bb229af..0000000
--- a/contrib/dev/vagrant/newest_dhcp_lease.py
+++ /dev/null
@@ -1,134 +0,0 @@
1#!/usr/bin/env python
2
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15"""
16Command-line utility to get the IP address from the newest DHCP lease.
17
18It's written for using with vagrant-hostmanager and vagrant-libvirt plugins.
19Vagrant-hostmanager by default fetches only IP addresses from eth0 interfaces
20on VM-s. Therefore, the first purpose of this utility is to be able to fetch
21the address also from the other interfaces.
22
23Libvirt/virsh only lists all DHCP leases for the given network with timestamps.
24DHCP leases have their expiration time, but are not cleaned up after destroying
25VM. If someone destroys and sets up the VM with the same hostname, we have
26many DHCP leases for the same hostname and we have to look up for timestamp.
27That's the second purpose of this script.
28"""
29
30import argparse
31import csv
32import functools
33import operator
34import xml.etree.ElementTree as etree
35
36import libvirt
37
38
39class NoPrivateDHCPInterfaceException(Exception):
40 pass
41
42
43class NoDHCPLeaseException(Exception):
44 pass
45
46
47def libvirt_conn(f):
48 @functools.wraps(f)
49 def wrapper(*args, **kwargs):
50 conn = libvirt.openReadOnly('qemu:///system')
51 return f(conn, *args, **kwargs)
52 return wrapper
53
54
55@libvirt_conn
56def get_vir_network_dhcp_lease(conn, vm_name):
57 """Libvirt since 1.2.6 version provides DHCPLeases method in virNetwork.
58
59 That's the current official way for getting DHCP leases and this
60 information isn't stored anywhere else anymore.
61 """
62 domain_name = 'vagrant_' + vm_name
63 mac_address = get_mac_address(conn, domain_name)
64
65 network = conn.networkLookupByName('vagrant-private-dhcp')
66 dhcp_leases = libvirt.virNetwork.DHCPLeases(network)
67
68 vm_dhcp_leases = [lease for lease in dhcp_leases
69 if lease['mac'] == mac_address]
70
71 newest_vm_dhcp_lease = sorted(vm_dhcp_leases,
72 key=operator.itemgetter('expirytime'),
73 reverse=True)[0]['ipaddr']
74 return newest_vm_dhcp_lease
75
76
77def get_mac_address(conn, domain_name):
78 """Get MAC address from domain XML."""
79 domain = conn.lookupByName(domain_name)
80 domain_xml = domain.XMLDesc()
81 domain_tree = etree.fromstring(domain_xml)
82 devices = domain_tree.find('devices')
83 interfaces = devices.iterfind('interface')
84
85 for interface in interfaces:
86 source = interface.find('source')
87 if source is None or source.get('network') != 'vagrant-private-dhcp':
88 continue
89 mac_element = interface.find('mac')
90 mac_address = mac_element.get('address')
91 return mac_address
92
93 raise NoPrivateDHCPInterfaceException()
94
95
96@libvirt_conn
97def get_dnsmasq_dhcp_lease(conn, vm_name):
98 """In libvirt under 1.2.6 DHCP leases are stored in file.
99
100 There is no API for DHCP leases yet.
101 """
102 domain_name = 'vagrant_' + vm_name
103 mac_address = get_mac_address(conn, domain_name)
104
105 with open(
106 '/var/lib/libvirt/dnsmasq/vagrant-private-dhcp.leases'
107 ) as leases_file:
108 reader = csv.reader(leases_file, delimiter=' ')
109 for row in reader:
110 lease_mac, lease_ip, lease_vm_name = row[1:4]
111 if not (lease_mac == mac_address and lease_vm_name == vm_name):
112 continue
113 return lease_ip
114
115 raise NoDHCPLeaseException()
116
117
118def main():
119 parser = argparse.ArgumentParser()
120 parser.add_argument('vm_name', help='Name of the virtual machine')
121
122 args = parser.parse_args()
123 vm_name = args.vm_name
124
125 if libvirt.getVersion() >= 1002006:
126 newest_dhcp_lease = get_vir_network_dhcp_lease(vm_name)
127 else:
128 newest_dhcp_lease = get_dnsmasq_dhcp_lease(vm_name)
129
130 print(newest_dhcp_lease)
131
132
133if __name__ == '__main__':
134 main()
diff --git a/contrib/template-override/opendaylight-template-overrides.j2 b/contrib/template-override/opendaylight-template-overrides.j2
index e9f6cf3..f6e1777 100644
--- a/contrib/template-override/opendaylight-template-overrides.j2
+++ b/contrib/template-override/opendaylight-template-overrides.j2
@@ -15,7 +15,7 @@ RUN pip --no-cache-dir install /plugins/*
15{{ macros.install_packages(opendaylight_packages | customizable("packages")) }} 15{{ macros.install_packages(opendaylight_packages | customizable("packages")) }}
16 16
17 {% if opendaylight_distro is not defined %} 17 {% if opendaylight_distro is not defined %}
18 {% set opendaylight_distro = 'distribution-karaf-0.5.3-Boron-SR3' %} 18 {% set opendaylight_distro = 'distribution-karaf-0.6.0-Carbon' %}
19 {% endif %} 19 {% endif %}
20ADD opendaylight-archive /opendaylight 20ADD opendaylight-archive /opendaylight
21RUN ln -s /opendaylight/{{ opendaylight_distro }} /opt/opendaylight 21RUN ln -s /opendaylight/{{ opendaylight_distro }} /opt/opendaylight
diff --git a/doc/CONTRIBUTING.rst b/doc/CONTRIBUTING.rst
index 504d9b1..fc6d81d 100644
--- a/doc/CONTRIBUTING.rst
+++ b/doc/CONTRIBUTING.rst
@@ -31,7 +31,7 @@ Please use the existing sandbox repository, available at
31https://git.openstack.org/cgit/openstack-dev/sandbox, for learning, understanding 31https://git.openstack.org/cgit/openstack-dev/sandbox, for learning, understanding
32and testing the `Gerrit Workflow`_. 32and testing the `Gerrit Workflow`_.
33 33
34.. _Gerrit Workflow: http://docs.openstack.org/infra/manual/developers.html#development-workflow 34.. _Gerrit Workflow: https://docs.openstack.org/infra/manual/developers.html#development-workflow
35 35
36Adding a new service 36Adding a new service
37==================== 37====================
@@ -61,7 +61,7 @@ processes generally use a base image and child images, e.g. ``glance-base``,
61 61
62Jinja2 'blocks' are employed throughout the Dockerfile's to help operators 62Jinja2 'blocks' are employed throughout the Dockerfile's to help operators
63customise various stages of the build (refer to 63customise various stages of the build (refer to
64http://docs.openstack.org/developer/kolla/image-building.html?highlight=override#dockerfile-customisation) 64https://docs.openstack.org/developer/kolla/image-building.html?highlight=override#dockerfile-customisation)
65 65
66Some of these blocks are free form however, there are a subset that should be 66Some of these blocks are free form however, there are a subset that should be
67common to every Dockerfile. The overall structure for a multi container service 67common to every Dockerfile. The overall structure for a multi container service
diff --git a/doc/image-building.rst b/doc/image-building.rst
index 77604e1..cd6962b 100644
--- a/doc/image-building.rst
+++ b/doc/image-building.rst
@@ -132,7 +132,7 @@ the best use of the Docker cache.
132 type = url 132 type = url
133 location = http://tarballs.openstack.org/glance/glance-master.tar.gz 133 location = http://tarballs.openstack.org/glance/glance-master.tar.gz
134 134
135 [keystone] 135 [keystone-base]
136 type = git 136 type = git
137 location = https://git.openstack.org/openstack/keystone 137 location = https://git.openstack.org/openstack/keystone
138 reference = stable/mitaka 138 reference = stable/mitaka
@@ -220,7 +220,7 @@ To add a package to this list, say, ``iproute``, first create a file, e.g.
220 # Horizon 220 # Horizon
221 {% set horizon_packages_append = ['iproute'] %} 221 {% set horizon_packages_append = ['iproute'] %}
222 222
223Then rebuild the horizon image, passing the ``--template-override`` argument: 223Then rebuild the horizon image, passing the ``--template-override`` argument::
224 224
225 kolla-build --template-override template-overrides.j2 horizon 225 kolla-build --template-override template-overrides.j2 horizon
226 226
diff --git a/doc/index.rst b/doc/index.rst
index 54e6202..34ec34c 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -24,8 +24,8 @@ for operating OpenStack clouds.
24This documentation is for the Kolla container images. The following subprojects 24This documentation is for the Kolla container images. The following subprojects
25are available to help deploy Kolla: 25are available to help deploy Kolla:
26 26
27* `kolla-ansible <http://docs.openstack.org/developer/kolla-ansible/>`_ 27* `kolla-ansible <https://docs.openstack.org/developer/kolla-ansible/>`_
28* `kolla-kubernetes <http://docs.openstack.org/developer/kolla-kubernetes>`_ 28* `kolla-kubernetes <https://docs.openstack.org/developer/kolla-kubernetes>`_
29 29
30Site Notes 30Site Notes
31========== 31==========
@@ -35,7 +35,7 @@ the project at any specific prior release. To access documentation for a
35previous release of kolla, append the OpenStack release name to the URL, for 35previous release of kolla, append the OpenStack release name to the URL, for
36example: 36example:
37 37
38 http://docs.openstack.org/developer/kolla/mitaka/ 38 https://docs.openstack.org/developer/kolla/mitaka/
39 39
40 40
41Kolla Overview 41Kolla Overview
diff --git a/doc/running-tests.rst b/doc/running-tests.rst
index 5c68ed8..e87127c 100644
--- a/doc/running-tests.rst
+++ b/doc/running-tests.rst
@@ -14,7 +14,7 @@ It is recommended for developers to run the test suite before submitting patch
14for review. This allows to catch errors as early as possible. 14for review. This allows to catch errors as early as possible.
15 15
16Preferred way to run the tests 16Preferred way to run the tests
17~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 17------------------------------
18 18
19The preferred way to run the unit tests is using ``tox``. It executes tests in 19The preferred way to run the unit tests is using ``tox``. It executes tests in
20isolated environment, by creating separate virtualenv and installing 20isolated environment, by creating separate virtualenv and installing
@@ -93,7 +93,7 @@ In order to get coverage report for Kolla, run the below command.
93 $ tox -e cover 93 $ tox -e cover
94 94
95Debugging unit tests 95Debugging unit tests
96------------------------ 96--------------------
97 97
98In order to break into the debugger from a unit test we need to insert 98In order to break into the debugger from a unit test we need to insert
99a breaking point to the code: 99a breaking point to the code:
@@ -108,9 +108,9 @@ Then run ``tox`` with the debug environment as one of the following::
108 tox -e debug test_file_name.TestClass.test_name 108 tox -e debug test_file_name.TestClass.test_name
109 109
110For more information see the `oslotest documentation 110For more information see the `oslotest documentation
111<http://docs.openstack.org/developer/oslotest/features.html#debugging-with-oslo-debug-helper>`_. 111<https://docs.openstack.org/developer/oslotest/features.html#debugging-with-oslo-debug-helper>`_.
112 112
113 113
114.. rubric:: Footnotes 114.. rubric:: Footnotes
115 115
116.. [#f1] See http://docs.openstack.org/infra/system-config/jenkins.html 116.. [#f1] See https://docs.openstack.org/infra/system-config/jenkins.html
diff --git a/doc/template-override/opendaylight-source.rst b/doc/template-override/opendaylight-source.rst
index 59ea9e3..36b0af3 100644
--- a/doc/template-override/opendaylight-source.rst
+++ b/doc/template-override/opendaylight-source.rst
@@ -21,17 +21,17 @@ Building OpenDaylight Containers
21 21
22- Change `opendaylight_distro` to match the folder where OpenDaylight 22- Change `opendaylight_distro` to match the folder where OpenDaylight
23 build resides. For example, if using prebuilt archive from OpenDaylight 23 build resides. For example, if using prebuilt archive from OpenDaylight
24 downloads `distribution-karaf-0.5.3-Boron-SR3.tar.gz` becomes 24 downloads `distribution-karaf-0.6.0-Carbon.tar.gz` becomes
25 `distribution-karaf-0.5.3-Boron-SR3`. 25 `distribution-karaf-0.6.0-Carbon`.
26 26
27kolla-build.conf 27kolla-build.conf
28________________ 28________________
29.. code-block:: console 29.. code-block:: console
30 30
31 opendaylight_distro = distribution-karaf-0.5.3-Boron-SR3 31 opendaylight_distro = distribution-karaf-0.6.0-Carbon
32 [opendaylight] 32 [opendaylight]
33 type = url 33 type = url
34 location = https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.5.3-Boron-SR3/distribution-karaf-0.5.3-Boron-SR3.tar.gz 34 location = https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.6.0-Carbon/distribution-karaf-0.6.0-Carbon.tar.gz
35 35
36Build the container (source or binary) by executing the following command: 36Build the container (source or binary) by executing the following command:
37 37
diff --git a/docker/base/MariaDB.repo b/docker/base/MariaDB.repo
index c4e150a..ddbb1a2 100644
--- a/docker/base/MariaDB.repo
+++ b/docker/base/MariaDB.repo
@@ -1,5 +1,5 @@
1[mariadb] 1[mariadb]
2name = MariaDB 2name = MariaDB
3baseurl = https://yum.mariadb.org/10.0.30/centos7-amd64 3baseurl = https://yum.mariadb.org/10.0/centos7-amd64
4gpgkey = https://yum.mariadb.org/RPM-GPG-KEY-MariaDB 4gpgkey = https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
5gpgcheck = 1 5gpgcheck = 1
diff --git a/docker/base/start.sh b/docker/base/start.sh
index 2612912..fce5199 100644
--- a/docker/base/start.sh
+++ b/docker/base/start.sh
@@ -1,13 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2set -o errexit 2set -o errexit
3 3
4# Wait for the log socket
5if [[ ! "${!SKIP_LOG_SETUP[@]}" && -e /var/lib/kolla/heka ]]; then
6 while [[ ! -S /var/lib/kolla/heka/log ]]; do
7 sleep 1
8 done
9fi
10
11# Processing /var/lib/kolla/config_files/config.json as root. This is necessary 4# Processing /var/lib/kolla/config_files/config.json as root. This is necessary
12# to permit certain files to be controlled by the root user which should 5# to permit certain files to be controlled by the root user which should
13# not be writable by the dropped-privileged user, especially /run_command 6# not be writable by the dropped-privileged user, especially /run_command
diff --git a/docker/ceilometer/ceilometer-ipmi/Dockerfile.j2 b/docker/ceilometer/ceilometer-ipmi/Dockerfile.j2
new file mode 100644
index 0000000..93c5990
--- /dev/null
+++ b/docker/ceilometer/ceilometer-ipmi/Dockerfile.j2
@@ -0,0 +1,22 @@
1FROM {{ namespace }}/{{ image_prefix }}ceilometer-base:{{ tag }}
2LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
3
4{% block ceilometer_ipmi_header %}{% endblock %}
5
6{% import "macros.j2" as macros with context %}
7
8{% if install_type == 'binary' %}
9 {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
10 {% set ceilometer_ipmi_packages = ['openstack-ceilometer-ipmi'] %}
11 {% elif base_distro in ['debian', 'ubuntu'] %}
12 {% set ceilometer_ipmi_packages = ['ceilometer-agent-ipmi'] %}
13 {% endif %}
14
15{{ macros.install_packages(ceilometer_ipmi_packages | customizable("packages")) }}
16
17{% endif %}
18
19{% block ceilometer_ipmi_footer %}{% endblock %}
20{% block footer %}{% endblock %}
21
22USER ceilometer
diff --git a/docker/cron/Dockerfile.j2 b/docker/cron/Dockerfile.j2
index 13745c9..6243ada 100644
--- a/docker/cron/Dockerfile.j2
+++ b/docker/cron/Dockerfile.j2
@@ -19,8 +19,5 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
19 19
20{{ macros.install_packages(cron_packages | customizable("packages")) }} 20{{ macros.install_packages(cron_packages | customizable("packages")) }}
21 21
22COPY extend_start.sh /usr/local/bin/kolla_extend_start
23RUN chmod 755 /usr/local/bin/kolla_extend_start
24
25{% block cron_footer %}{% endblock %} 22{% block cron_footer %}{% endblock %}
26{% block footer %}{% endblock %} 23{% block footer %}{% endblock %}
diff --git a/docker/cron/extend_start.sh b/docker/cron/extend_start.sh
deleted file mode 100644
index 08efca9..0000000
--- a/docker/cron/extend_start.sh
+++ /dev/null
@@ -1,7 +0,0 @@
1#!/bin/bash
2
3# NOTE(elemoine): the cron daemon sends its logs to /dev/log. Heka's log socket
4# is at /var/lib/kolla/heka/log so we symlink /dev/log to that location.
5if [[ ! -h /dev/log ]]; then
6 ln -sf /var/lib/kolla/heka/log /dev/log
7fi
diff --git a/docker/etcd/extend_start.sh b/docker/etcd/extend_start.sh
index 718de9e..c540232 100644
--- a/docker/etcd/extend_start.sh
+++ b/docker/etcd/extend_start.sh
@@ -8,9 +8,6 @@ if [[ $(stat -c %a /var/log/kolla/etcd) != "755" ]]; then
8 chmod 755 /var/log/kolla/etcd 8 chmod 755 /var/log/kolla/etcd
9fi 9fi
10 10
11# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases 11if [[ $(stat -c %U /var/lib/etcd/) != "etcd" ]]; then
12# of the KOLLA_BOOTSTRAP variable being set, including empty.
13if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
14 sudo chown etcd: /var/lib/etcd/ 12 sudo chown etcd: /var/lib/etcd/
15 exit 0
16fi 13fi
diff --git a/docker/ironic/ironic-api/Dockerfile.j2 b/docker/ironic/ironic-api/Dockerfile.j2
index 33738e2..3aa5a0a 100644
--- a/docker/ironic/ironic-api/Dockerfile.j2
+++ b/docker/ironic/ironic-api/Dockerfile.j2
@@ -7,13 +7,45 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
7 7
8{% if install_type == 'binary' %} 8{% if install_type == 'binary' %}
9 {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} 9 {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
10 {% set ironic_api_packages = ['openstack-ironic-api'] %} 10 {% set ironic_api_packages = [
11 'httpd',
12 'mod_ssl',
13 'mod_wsgi',
14 'openstack-ironic-api'
15 ] %}
11 {% elif base_distro in ['debian', 'ubuntu'] %} 16 {% elif base_distro in ['debian', 'ubuntu'] %}
12 {% set ironic_api_packages = ['ironic-api'] %} 17 {% set ironic_api_packages = [
18 'apache2',
19 'ironic-api',
20 'libapache2-mod-wsgi'
21 ] %}
13 {% endif %} 22 {% endif %}
14 23
24{% elif install_type == 'source' %}
25 {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
26 {% set ironic_api_packages = [
27 'httpd',
28 'mod_ssl',
29 'mod_wsgi'
30 ] %}
31 {% elif base_distro in ['debian', 'ubuntu'] %}
32 {% set ironic_api_packages = [
33 'apache2',
34 'libapache2-mod-wsgi'
35 ] %}
36 {% endif %}
37
38{% endif %}
39
15{{ macros.install_packages(ironic_api_packages | customizable("packages")) }} 40{{ macros.install_packages(ironic_api_packages | customizable("packages")) }}
16 41
42{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
43RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \
44 && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf
45
46{% elif base_distro in ['debian', 'ubuntu'] %}
47RUN echo > /etc/apache2/ports.conf
48
17{% endif %} 49{% endif %}
18 50
19COPY extend_start.sh /usr/local/bin/kolla_ironic_extend_start 51COPY extend_start.sh /usr/local/bin/kolla_ironic_extend_start
diff --git a/docker/ironic/ironic-api/extend_start.sh b/docker/ironic/ironic-api/extend_start.sh
index cd9c95a..7ac9f90 100644
--- a/docker/ironic/ironic-api/extend_start.sh
+++ b/docker/ironic/ironic-api/extend_start.sh
@@ -6,3 +6,16 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
6 ironic-dbsync upgrade 6 ironic-dbsync upgrade
7 exit 0 7 exit 0
8fi 8fi
9
10# Assume the service runs on top of Apache when user is root
11if [[ "$(whoami)" == 'root' ]]; then
12 # NOTE(pbourke): httpd will not clean up after itself in some cases which
13 # results in the container not being able to restart. (bug #1489676, 1557036)
14 if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
15 # Loading Apache2 ENV variables
16 . /etc/apache2/envvars
17 rm -rf /var/run/apache2/*
18 else
19 rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
20 fi
21fi
diff --git a/docker/keepalived/extend_start.sh b/docker/keepalived/extend_start.sh
index 0cb7976..e1fe5d9 100644
--- a/docker/keepalived/extend_start.sh
+++ b/docker/keepalived/extend_start.sh
@@ -1,12 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2 2
3# NOTE(elemoine): keepalived cannot be configured to change the log address to
4# anything other than /dev/log. Heka's log socket is at /var/lib/kolla/heka/log
5# so we symlink /dev/log to that location.
6if [[ ! -h /dev/log ]]; then
7 ln -sf /var/lib/kolla/heka/log /dev/log
8fi
9
10modprobe ip_vs 3modprobe ip_vs
11 4
12# Workaround for bug #1485079 5# Workaround for bug #1485079
diff --git a/docker/keystone/keystone-ssh/extend_start.sh b/docker/keystone/keystone-ssh/extend_start.sh
index 23744ce..dc8f04b 100644
--- a/docker/keystone/keystone-ssh/extend_start.sh
+++ b/docker/keystone/keystone-ssh/extend_start.sh
@@ -1,9 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2 2
3if [[ ! -L /dev/log ]]; then
4 ln -sf /var/lib/kolla/heka/log /dev/log
5fi
6
7SSH_HOST_KEY_TYPES=( "rsa" "dsa" "ecdsa" "ed25519" ) 3SSH_HOST_KEY_TYPES=( "rsa" "dsa" "ecdsa" "ed25519" )
8 4
9for key_type in ${SSH_HOST_KEY_TYPES[@]}; do 5for key_type in ${SSH_HOST_KEY_TYPES[@]}; do
diff --git a/docker/keystone/keystone/Dockerfile.j2 b/docker/keystone/keystone/Dockerfile.j2
index 26745fe..d7932e7 100644
--- a/docker/keystone/keystone/Dockerfile.j2
+++ b/docker/keystone/keystone/Dockerfile.j2
@@ -5,7 +5,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
5 5
6{% import "macros.j2" as macros with context %} 6{% import "macros.j2" as macros with context %}
7 7
8{% if install_type == 'source' %}
8ADD plugins-archive / 9ADD plugins-archive /
10{% endif %}
11
9COPY keystone_bootstrap.sh /usr/local/bin/kolla_keystone_bootstrap 12COPY keystone_bootstrap.sh /usr/local/bin/kolla_keystone_bootstrap
10COPY extend_start.sh /usr/local/bin/kolla_extend_start 13COPY extend_start.sh /usr/local/bin/kolla_extend_start
11 14
diff --git a/docker/kolla-toolbox/Dockerfile.j2 b/docker/kolla-toolbox/Dockerfile.j2
index aee5a20..a8fb302 100644
--- a/docker/kolla-toolbox/Dockerfile.j2
+++ b/docker/kolla-toolbox/Dockerfile.j2
@@ -19,6 +19,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
19 'libffi-devel', 19 'libffi-devel',
20 'libxml2-devel', 20 'libxml2-devel',
21 'libxslt-devel', 21 'libxslt-devel',
22 'make',
22 'openssh-clients', 23 'openssh-clients',
23 'openssl-devel', 24 'openssl-devel',
24 'python-devel' 25 'python-devel'
diff --git a/docker/kuryr/kuryr-base/Dockerfile.j2 b/docker/kuryr/kuryr-base/Dockerfile.j2
index 8611a64..a7ed3bc 100644
--- a/docker/kuryr/kuryr-base/Dockerfile.j2
+++ b/docker/kuryr/kuryr-base/Dockerfile.j2
@@ -5,6 +5,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
5 5
6{% import "macros.j2" as macros with context %} 6{% import "macros.j2" as macros with context %}
7 7
8{{ macros.configure_user(name='kuryr') }}
9
8{% if install_type == 'binary' %} 10{% if install_type == 'binary' %}
9 11
10RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ 12RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
@@ -22,8 +24,9 @@ ADD kuryr-base-archive /kuryr-base-source
22# Otherwise, it will be failed. 24# Otherwise, it will be failed.
23RUN ln -s kuryr-base-source/* kuryr-base \ 25RUN ln -s kuryr-base-source/* kuryr-base \
24 && sed -i 's|^kuryr-lib===.*$||g' requirements/upper-constraints.txt \ 26 && sed -i 's|^kuryr-lib===.*$||g' requirements/upper-constraints.txt \
25 && {{ macros.install_pip(kuryr_base_pip_packages | customizable("pip_packages")) }} 27 && {{ macros.install_pip(kuryr_base_pip_packages | customizable("pip_packages")) }} \
26 28 && mkdir -p /etc/kuryr \
29 && chown -R kuryr: /etc/kuryr
27{% endif %} 30{% endif %}
28 31
29COPY extend_start.sh /usr/local/bin/kolla_extend_start 32COPY extend_start.sh /usr/local/bin/kolla_extend_start
diff --git a/docker/kuryr/kuryr-base/extend_start.sh b/docker/kuryr/kuryr-base/extend_start.sh
index 214675b..b109ce4 100644
--- a/docker/kuryr/kuryr-base/extend_start.sh
+++ b/docker/kuryr/kuryr-base/extend_start.sh
@@ -1,6 +1,7 @@
1#!/bin/bash 1#!/bin/bash
2 2
3KURYR_LOG_DIR=/var/log/kolla/kuryr 3KURYR_LOG_DIR=/var/log/kolla/kuryr
4KURYR_DOCKER_PLUGINS_DIR=/usr/lib/docker/plugins/kuryr
4 5
5if [[ ! -d "${KURYR_LOG_DIR}" ]]; then 6if [[ ! -d "${KURYR_LOG_DIR}" ]]; then
6 mkdir -p ${KURYR_LOG_DIR} 7 mkdir -p ${KURYR_LOG_DIR}
@@ -9,7 +10,6 @@ if [[ $(stat -c %a ${KURYR_LOG_DIR}) != "755" ]]; then
9 chmod 755 ${KURYR_LOG_DIR} 10 chmod 755 ${KURYR_LOG_DIR}
10fi 11fi
11 12
12if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then 13if [[ ! -d "${KURYR_DOCKER_PLUGINS_DIR}" ]]; then
13 mkdir -p /usr/lib/docker/plugins/kuryr 14 mkdir -p ${KURYR_DOCKER_PLUGINS_DIR}
14 exit 0
15fi 15fi
diff --git a/docker/kuryr/kuryr-libnetwork/Dockerfile.j2 b/docker/kuryr/kuryr-libnetwork/Dockerfile.j2
index 1872957..7cd9aca 100644
--- a/docker/kuryr/kuryr-libnetwork/Dockerfile.j2
+++ b/docker/kuryr/kuryr-libnetwork/Dockerfile.j2
@@ -11,6 +11,22 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
11 && /bin/false 11 && /bin/false
12 12
13{% elif install_type == 'source' %} 13{% elif install_type == 'source' %}
14 {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
15
16 {% set kuryr_libnetwork_packages = [
17 'bridge-utils',
18 'openvswitch'
19 ] %}
20
21 {% elif base_distro in ['debian', 'ubuntu'] %}
22
23 {% set kuryr_libnetwork_packages = [
24 'bridge-utils',
25 'openvswitch-switch'
26 ] %}
27
28 {% endif %}
29{{ macros.install_packages(kuryr_libnetwork_packages | customizable("packages")) }}
14 30
15ADD kuryr-libnetwork-archive /kuryr-libnetwork-source 31ADD kuryr-libnetwork-archive /kuryr-libnetwork-source
16 32
diff --git a/docker/macros.j2 b/docker/macros.j2
index 479d33f..8c323cd 100644
--- a/docker/macros.j2
+++ b/docker/macros.j2
@@ -6,7 +6,7 @@
6 {#- 6 {#-
7 debian_package_install is a utility method to build up an appropriate 7 debian_package_install is a utility method to build up an appropriate
8 set of commands to install packages in a debian-based environment that 8 set of commands to install packages in a debian-based environment that
9 may include URL links to a .deb package (e.g, heka) 9 may include URL links to a .deb package
10 -#} 10 -#}
11 RUN {{ debian_package_install(packages) }} 11 RUN {{ debian_package_install(packages) }}
12 {%- endif %} 12 {%- endif %}
diff --git a/docker/manila/manila-data/Dockerfile.j2 b/docker/manila/manila-data/Dockerfile.j2
index f1408a0..eb8a9de 100644
--- a/docker/manila/manila-data/Dockerfile.j2
+++ b/docker/manila/manila-data/Dockerfile.j2
@@ -6,12 +6,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
6{% import "macros.j2" as macros with context %} 6{% import "macros.j2" as macros with context %}
7 7
8{% if install_type == 'binary' %} 8{% if install_type == 'binary' %}
9 {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} 9 {% if base_distro in ['debian', 'ubuntu'] %}
10
11RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
12 && /bin/false
13
14 {% elif base_distro in ['debian', 'ubuntu'] %}
15 10
16 {% set manila_data_packages = [ 11 {% set manila_data_packages = [
17 'manila-data' 12 'manila-data'
diff --git a/docker/neutron/neutron-server-opendaylight/Dockerfile.j2 b/docker/neutron/neutron-server-opendaylight/Dockerfile.j2
new file mode 100644
index 0000000..4c1581b
--- /dev/null
+++ b/docker/neutron/neutron-server-opendaylight/Dockerfile.j2
@@ -0,0 +1,35 @@
1FROM {{ namespace }}/{{ image_prefix }}neutron-server:{{ tag }}
2LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
3
4USER root
5
6{% block neutron_server_opendaylight_header %}{% endblock %}
7
8{% import "macros.j2" as macros with context %}
9
10{% if install_type == 'binary' %}
11 {% set neutron_server_opendaylight_packages = [
12 'python-networking-odl',
13 'python-networking-bgpvpn',
14 'python-networking-l2gw',
15 'python-networking-sfc'
16 ] %}
17
18{{ macros.install_packages(neutron_server_opendaylight_packages | customizable("packages")) }}
19
20{% elif install_type == 'source' %}
21
22ADD plugins-archive /
23
24{% set neutron_server_opendaylight_plugins_pip_packages = [
25 '/plugins/*'
26] %}
27
28RUN {{ macros.install_pip(neutron_server_opendaylight_plugins_pip_packages | customizable("pip_packages")) }};
29
30{% endif %}
31
32{% block neutron_server_opendaylight_footer %}{% endblock %}
33{% block footer %}{% endblock %}
34
35USER neutron
diff --git a/docker/neutron/neutron-server/Dockerfile.j2 b/docker/neutron/neutron-server/Dockerfile.j2
index cce0d40..9790414 100644
--- a/docker/neutron/neutron-server/Dockerfile.j2
+++ b/docker/neutron/neutron-server/Dockerfile.j2
@@ -30,25 +30,25 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
30{% elif install_type == 'source' %} 30{% elif install_type == 'source' %}
31 31
32 {% set neutron_server_pip_packages = [ 32 {% set neutron_server_pip_packages = [
33 'oslo-vmware' 33 'oslo-vmware',
34 '"networking-hyperv<=4.0.0"'
34 ] %} 35 ] %}
35 36
36RUN {{ macros.install_pip(neutron_server_pip_packages | customizable("pip_packages")) }} 37 {% set neutron_server_plugins_pip_packages = [
37 38 '/plugins/*'
38{% endif %} 39 ] %}
39 40
40ADD plugins-archive / 41ADD plugins-archive /
41 42RUN {{ macros.install_pip(neutron_server_pip_packages | customizable("pip_packages")) }} \
42{% set neutron_server_plugins_pip_packages = [
43 '/plugins/*'
44] %}
45
46COPY extend_start.sh /usr/local/bin/kolla_neutron_extend_start
47RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start \
48 && if [ "$(ls /plugins)" ]; then \ 43 && if [ "$(ls /plugins)" ]; then \
49 {{ macros.install_pip(neutron_server_plugins_pip_packages | customizable("pip_packages")) }}; \ 44 {{ macros.install_pip(neutron_server_plugins_pip_packages | customizable("pip_packages")) }}; \
50 fi 45 fi
51 46
47{% endif %}
48
49COPY extend_start.sh /usr/local/bin/kolla_neutron_extend_start
50RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start
51
52{% block neutron_server_footer %}{% endblock %} 52{% block neutron_server_footer %}{% endblock %}
53{% block footer %}{% endblock %} 53{% block footer %}{% endblock %}
54 54
diff --git a/docker/nova/nova-compute/Dockerfile.j2 b/docker/nova/nova-compute/Dockerfile.j2
index 710f5b9..a307e57 100644
--- a/docker/nova/nova-compute/Dockerfile.j2
+++ b/docker/nova/nova-compute/Dockerfile.j2
@@ -10,6 +10,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
10 10
11 {% set nova_compute_packages = [ 11 {% set nova_compute_packages = [
12 'ceph-common', 12 'ceph-common',
13 'e2fsprogs',
13 'genisoimage', 14 'genisoimage',
14 'iscsi-initiator-utils', 15 'iscsi-initiator-utils',
15 'nfs-utils', 16 'nfs-utils',
@@ -28,6 +29,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
28 # ironic as workaround https://bugs.launchpad.net/packstack/+bug/1430388 29 # ironic as workaround https://bugs.launchpad.net/packstack/+bug/1430388
29 {% set nova_compute_packages = [ 30 {% set nova_compute_packages = [
30 'ceph-common', 31 'ceph-common',
32 'e2fsprogs',
31 'genisoimage', 33 'genisoimage',
32 'ironic-common', 34 'ironic-common',
33 'nfs-common', 35 'nfs-common',
@@ -63,6 +65,7 @@ RUN rm -f /etc/nova/nova-compute.conf
63 {% set nova_compute_packages = [ 65 {% set nova_compute_packages = [
64 'ceph-common', 66 'ceph-common',
65 'dosfstools', 67 'dosfstools',
68 'e2fsprogs',
66 'genisoimage', 69 'genisoimage',
67 'iscsi-initiator-utils', 70 'iscsi-initiator-utils',
68 'libvirt-devel', 71 'libvirt-devel',
@@ -80,6 +83,7 @@ RUN rm -f /etc/nova/nova-compute.conf
80 {% set nova_compute_packages = [ 83 {% set nova_compute_packages = [
81 'ceph-common', 84 'ceph-common',
82 'dosfstools', 85 'dosfstools',
86 'e2fsprogs',
83 'genisoimage', 87 'genisoimage',
84 'libosinfo-bin', 88 'libosinfo-bin',
85 'libvirt-dev', 89 'libvirt-dev',
@@ -113,23 +117,22 @@ RUN mkdir -p /etc/ceph
113 ] 117 ]
114%} 118%}
115 119
116RUN {{ macros.install_pip(nova_compute_pip_packages | customizable("pip_packages")) }}
117
118{% endif %}
119
120ADD plugins-archive /
121
122{% set nova_compute_plugins_pip_packages = [ 120{% set nova_compute_plugins_pip_packages = [
123 '/plugins/*' 121 '/plugins/*'
124] %} 122] %}
125 123
126COPY extend_start.sh /usr/local/bin/kolla_nova_extend_start 124ADD plugins-archive /
127RUN chmod 755 /usr/local/bin/kolla_nova_extend_start \ 125RUN {{ macros.install_pip(nova_compute_pip_packages | customizable("pip_packages")) }} \
128 && rm -f /etc/machine-id \
129 && if [ "$(ls /plugins)" ]; then \ 126 && if [ "$(ls /plugins)" ]; then \
130 {{ macros.install_pip(nova_compute_plugins_pip_packages | customizable("pip_packages")) }}; \ 127 {{ macros.install_pip(nova_compute_plugins_pip_packages | customizable("pip_packages")) }}; \
131 fi 128 fi
132 129
130{% endif %}
131
132COPY extend_start.sh /usr/local/bin/kolla_nova_extend_start
133RUN chmod 755 /usr/local/bin/kolla_nova_extend_start \
134 && rm -f /etc/machine-id
135
133ENV PATH $PATH:/lib/udev 136ENV PATH $PATH:/lib/udev
134 137
135{% block nova_compute_footer %}{% endblock %} 138{% block nova_compute_footer %}{% endblock %}
diff --git a/docker/nova/nova-ssh/extend_start.sh b/docker/nova/nova-ssh/extend_start.sh
index da05e43..6d52952 100644
--- a/docker/nova/nova-ssh/extend_start.sh
+++ b/docker/nova/nova-ssh/extend_start.sh
@@ -1,9 +1,5 @@
1#!/bin/bash 1#!/bin/bash
2 2
3if [[ ! -L /dev/log ]]; then
4 ln -sf /var/lib/kolla/heka/log /dev/log
5fi
6
7SSH_HOST_KEY_TYPES=( "rsa" "dsa" "ecdsa" "ed25519" ) 3SSH_HOST_KEY_TYPES=( "rsa" "dsa" "ecdsa" "ed25519" )
8 4
9for key_type in ${SSH_HOST_KEY_TYPES[@]}; do 5for key_type in ${SSH_HOST_KEY_TYPES[@]}; do
diff --git a/docker/opendaylight/Dockerfile.j2 b/docker/opendaylight/Dockerfile.j2
index c010879..5b6b9f4 100644
--- a/docker/opendaylight/Dockerfile.j2
+++ b/docker/opendaylight/Dockerfile.j2
@@ -5,7 +5,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
5 5
6{% import "macros.j2" as macros with context %} 6{% import "macros.j2" as macros with context %}
7 7
8{{ macros.configure_user(name='opendaylight') }} 8{{ macros.configure_user(name='odl') }}
9 9
10{% if install_type == 'binary' %} 10{% if install_type == 'binary' %}
11 {% set opendaylight_packages = ['opendaylight'] %} 11 {% set opendaylight_packages = ['opendaylight'] %}
diff --git a/docker/opendaylight/opendaylight.repo b/docker/opendaylight/opendaylight.repo
index bf99023..8c0c299 100644
--- a/docker/opendaylight/opendaylight.repo
+++ b/docker/opendaylight/opendaylight.repo
@@ -1,5 +1,5 @@
1[opendaylight] 1[opendaylight]
2name=CentOS CBS OpenDaylight Release Repository 2name=CentOS CBS OpenDaylight Release Repository
3baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-5-release/x86_64/os/ 3baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-6-release/x86_64/os/
4enabled=1 4enabled=1
5gpgcheck=0 5gpgcheck=0
diff --git a/docker/ovn/ovn-base/Dockerfile.j2 b/docker/ovn/ovn-base/Dockerfile.j2
new file mode 100644
index 0000000..cb095d6
--- /dev/null
+++ b/docker/ovn/ovn-base/Dockerfile.j2
@@ -0,0 +1,26 @@
1FROM {{ namespace }}/{{ image_prefix }}openvswitch-base:{{ tag }}
2LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
3
4{% block ovn_base_header %}{% endblock %}
5
6{% import "macros.j2" as macros with context %}
7
8{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
9 {% set ovn_base_packages = [
10 'openvswitch-ovn-common',
11 ] %}
12
13{% elif base_distro in ['debian', 'ubuntu'] %}
14 {% set ovn_base_packages = [
15 'ovn-common',
16 ] %}
17
18{% endif %}
19{{ macros.install_packages(ovn_base_packages | customizable("packages")) }}
20
21COPY extend_start.sh /usr/local/bin/kolla_extend_start
22
23RUN touch /usr/local/bin/kolla_ovn_extend_start \
24 && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_ovn_extend_start
25
26{% block ovn_base_footer %}{% endblock %}
diff --git a/docker/ovn/ovn-base/extend_start.sh b/docker/ovn/ovn-base/extend_start.sh
new file mode 100644
index 0000000..089c8f6
--- /dev/null
+++ b/docker/ovn/ovn-base/extend_start.sh
@@ -0,0 +1,10 @@
1#!/bin/bash
2
3if [[ ! -d "/var/log/kolla/openvswitch" ]]; then
4 mkdir -p /var/log/kolla/openvswitch
5fi
6if [[ $(stat -c %a /var/log/kolla/openvswitch) != "755" ]]; then
7 chmod 755 /var/log/kolla/openvswitch
8fi
9
10. /usr/local/bin/kolla_ovn_extend_start
diff --git a/docker/ovn/ovn-controller/Dockerfile.j2 b/docker/ovn/ovn-controller/Dockerfile.j2
new file mode 100644
index 0000000..d22ae8a
--- /dev/null
+++ b/docker/ovn/ovn-controller/Dockerfile.j2
@@ -0,0 +1,22 @@
1FROM {{ namespace }}/{{ image_prefix }}ovn-base:{{ tag }}
2LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
3
4{% block ovn_controller_header %}{% endblock %}
5
6{% import "macros.j2" as macros with context %}
7
8{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
9 {% set ovn_controller_packages = [
10 'openvswitch-ovn-host'
11 ] %}
12
13{% elif base_distro in ['debian', 'ubuntu'] %}
14 {% set ovn_controller_packages = [
15 'ovn-host'
16 ] %}
17
18{% endif %}
19{{ macros.install_packages(ovn_controller_packages | customizable("packages")) }}
20
21{% block ovn_controller_footer %}{% endblock %}
22{% block footer %}{% endblock %}
diff --git a/docker/ovn/ovn-nb-db-server/Dockerfile.j2 b/docker/ovn/ovn-nb-db-server/Dockerfile.j2
new file mode 100644
index 0000000..a20b134
--- /dev/null
+++ b/docker/ovn/ovn-nb-db-server/Dockerfile.j2
@@ -0,0 +1,27 @@
1FROM {{ namespace }}/{{ image_prefix }}ovn-base:{{ tag }}
2LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
3
4{% block ovn_nb_db_server_header %}{% endblock %}
5
6{% import "macros.j2" as macros with context %}
7
8{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
9 {% set ovn_nb_db_server_packages = [
10 'openvswitch-ovn-central',
11 ] %}
12
13{% elif base_distro in ['debian', 'ubuntu'] %}
14 {% set ovn_nb_db_server_packages = [
15 'ovn-central',
16 ] %}
17
18{% endif %}
19{{ macros.install_packages(ovn_nb_db_server_packages | customizable("packages")) }}
20
21COPY extend_start.sh /usr/local/bin/kolla_ovn_extend_start
22COPY start_nb_db_server.sh /usr/local/bin/start-nb-db-server
23RUN chmod 755 /usr/local/bin/kolla_ovn_extend_start \
24 /usr/local/bin/start-nb-db-server
25
26{% block ovn_nb_db_server_footer %}{% endblock %}
27{% block footer %}{% endblock %}
diff --git a/docker/ovn/ovn-nb-db-server/extend_start.sh b/docker/ovn/ovn-nb-db-server/extend_start.sh
new file mode 100644
index 0000000..dffc85c
--- /dev/null
+++ b/docker/ovn/ovn-nb-db-server/extend_start.sh
@@ -0,0 +1,6 @@
1#!/bin/bash
2
3mkdir -p "/run/openvswitch"
4if [[ ! -e "/var/lib/openvswitch/ovnnb.db" ]]; then
5 ovsdb-tool create "/var/lib/openvswitch/ovnnb.db" "/usr/share/openvswitch/ovn-nb.ovsschema"
6fi
diff --git a/docker/ovn/ovn-nb-db-server/start_nb_db_server.sh b/docker/ovn/ovn-nb-db-server/start_nb_db_server.sh
new file mode 100755
index 0000000..5c5767d
--- /dev/null
+++ b/docker/ovn/ovn-nb-db-server/start_nb_db_server.sh
@@ -0,0 +1,11 @@
1#!/bin/bash
2
3ovsdb_ip=$1
4ovnnb_port=$2
5if [ -e $ovnnb_port ]; then
6 ovnnb_port=6641
7fi
8
9/usr/sbin/ovsdb-server /var/lib/openvswitch/ovnnb.db -vconsole:emer -vsyslog:err -vfile:info \
10--remote=punix:/run/openvswitch/ovnnb_db.sock --remote=ptcp:$ovnnb_port:$ovsdb_ip \
11--unixctl=/run/openvswitch/ovnnb_db.ctl --log-file=/var/log/kolla/openvswitch/ovsdb-server-nb.log
diff --git a/docker/ovn/ovn-northd/Dockerfile.j2 b/docker/ovn/ovn-northd/Dockerfile.j2
new file mode 100644
index 0000000..2f865ba
--- /dev/null
+++ b/docker/ovn/ovn-northd/Dockerfile.j2
@@ -0,0 +1,22 @@
1FROM {{ namespace }}/{{ image_prefix }}ovn-base:{{ tag }}
2LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
3
4{% block ovn_northd_header %}{% endblock %}
5
6{% import "macros.j2" as macros with context %}
7
8{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
9 {% set ovn_northd_packages = [
10 'openvswitch-ovn-central',
11 ] %}
12
13{% elif base_distro in ['debian', 'ubuntu'] %}
14 {% set ovn_northd_packages = [
15 'ovn-central',
16 ] %}
17
18{% endif %}
19{{ macros.install_packages(ovn_northd_packages | customizable("packages")) }}
20
21{% block ovn_northd_footer %}{% endblock %}
22{% block footer %}{% endblock %}
diff --git a/docker/ovn/ovn-sb-db-server/Dockerfile.j2 b/docker/ovn/ovn-sb-db-server/Dockerfile.j2
new file mode 100644
index 0000000..427c3d5
--- /dev/null
+++ b/docker/ovn/ovn-sb-db-server/Dockerfile.j2
@@ -0,0 +1,27 @@
1FROM {{ namespace }}/{{ image_prefix }}ovn-base:{{ tag }}
2LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
3
4{% block ovn_sb_db_server_header %}{% endblock %}
5
6{% import "macros.j2" as macros with context %}
7
8{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
9 {% set ovn_sb_db_server_packages = [
10 'openvswitch-ovn-central',
11 ] %}
12
13{% elif base_distro in ['debian', 'ubuntu'] %}
14 {% set ovn_sb_db_server_packages = [
15 'ovn-central',
16 ] %}
17
18{% endif %}
19{{ macros.install_packages(ovn_sb_db_server_packages | customizable("packages")) }}
20
21COPY extend_start.sh /usr/local/bin/kolla_ovn_extend_start
22COPY start_sb_db_server.sh /usr/local/bin/start-sb-db-server
23RUN chmod 755 /usr/local/bin/kolla_ovn_extend_start \
24 /usr/local/bin/start-sb-db-server
25
26{% block ovn_sb_db_server_footer %}{% endblock %}
27{% block footer %}{% endblock %}
diff --git a/docker/ovn/ovn-sb-db-server/extend_start.sh b/docker/ovn/ovn-sb-db-server/extend_start.sh
new file mode 100644
index 0000000..688e37a
--- /dev/null
+++ b/docker/ovn/ovn-sb-db-server/extend_start.sh
@@ -0,0 +1,6 @@
1#!/bin/bash
2
3mkdir -p "/run/openvswitch"
4if [[ ! -e "/var/lib/openvswitch/ovnsb.db" ]]; then
5 ovsdb-tool create "/var/lib/openvswitch/ovnsb.db" "/usr/share/openvswitch/ovn-sb.ovsschema"
6fi
diff --git a/docker/ovn/ovn-sb-db-server/start_sb_db_server.sh b/docker/ovn/ovn-sb-db-server/start_sb_db_server.sh
new file mode 100755
index 0000000..2f9cda7
--- /dev/null
+++ b/docker/ovn/ovn-sb-db-server/start_sb_db_server.sh
@@ -0,0 +1,11 @@
1#!/bin/bash
2
3ovnsb_db_ip=$1
4ovnsb_port=$2
5if [ -e $ovnsb_port ]; then
6 ovnsb_port=6642
7fi
8
9/usr/sbin/ovsdb-server /var/lib/openvswitch/ovnsb.db -vconsole:emer -vsyslog:err -vfile:info \
10--remote=punix:/run/openvswitch/ovnsb_db.sock --remote=ptcp:$ovnsb_port:$ovnsb_db_ip \
11--unixctl=/run/openvswitch/ovnsb_db.ctl --log-file=/var/log/kolla/openvswitch/ovsdb-server-sb.log
diff --git a/docker/rabbitmq/extend_start.sh b/docker/rabbitmq/extend_start.sh
index 7aa685e..ef28d2b 100644
--- a/docker/rabbitmq/extend_start.sh
+++ b/docker/rabbitmq/extend_start.sh
@@ -1,5 +1,7 @@
1#!/bin/bash 1#!/bin/bash
2 2
3: ${RABBITMQ_LOG_DIR:=/var/log/kolla/rabbitmq}
4
3# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases 5# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
4# of the KOLLA_BOOTSTRAP variable being set, including empty. 6# of the KOLLA_BOOTSTRAP variable being set, including empty.
5if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then 7if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
@@ -15,9 +17,10 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
15 exit 0 17 exit 0
16fi 18fi
17 19
18if [[ ! -d "/var/log/kolla/rabbitmq" ]]; then 20if [[ ! -d "${RABBITMQ_LOG_DIR}" ]]; then
19 mkdir -p /var/log/kolla/rabbitmq 21 mkdir -p ${RABBITMQ_LOG_DIR}
20fi 22fi
21if [[ $(stat -c %a /var/log/kolla/rabbitmq) != "755" ]]; then 23
22 chmod 755 /var/log/kolla/rabbitmq 24if [[ $(stat -c %a ${RABBITMQ_LOG_DIR}) != "755" ]]; then
25 chmod 755 ${RABBITMQ_LOG_DIR}
23fi 26fi
diff --git a/docker/sahara/sahara-engine/Dockerfile.j2 b/docker/sahara/sahara-engine/Dockerfile.j2
index 0e9560f..a9cc046 100644
--- a/docker/sahara/sahara-engine/Dockerfile.j2
+++ b/docker/sahara/sahara-engine/Dockerfile.j2
@@ -7,9 +7,15 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
7 7
8{% if install_type == 'binary' %} 8{% if install_type == 'binary' %}
9 {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} 9 {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
10 {% set sahara_engine_packages = ['openstack-sahara-engine'] %} 10 {% set sahara_engine_packages = [
11 'nc',
12 'openstack-sahara-engine',
13 ] %}
11 {% elif base_distro in ['debian', 'ubuntu'] %} 14 {% elif base_distro in ['debian', 'ubuntu'] %}
12 {% set sahara_engine_packages = ['sahara-engine'] %} 15 {% set sahara_engine_packages = [
16 'netcat',
17 'sahara-engine',
18 ] %}
13 {% endif %} 19 {% endif %}
14{% elif install_type == 'source' %} 20{% elif install_type == 'source' %}
15 {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} 21 {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
diff --git a/docker/skydive/skydive-agent/Dockerfile.j2 b/docker/skydive/skydive-agent/Dockerfile.j2
new file mode 100644
index 0000000..50708e1
--- /dev/null
+++ b/docker/skydive/skydive-agent/Dockerfile.j2
@@ -0,0 +1,7 @@
1FROM {{ namespace }}/{{ image_prefix }}skydive-base:{{ tag }}
2LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
3
4{% block skydive_agent_header %}{% endblock %}
5
6{% block skydive_agent_footer %}{% endblock %}
7{% block footer %}{% endblock %}
diff --git a/docker/skydive/skydive-analyzer/Dockerfile.j2 b/docker/skydive/skydive-analyzer/Dockerfile.j2
new file mode 100644
index 0000000..409076d
--- /dev/null
+++ b/docker/skydive/skydive-analyzer/Dockerfile.j2
@@ -0,0 +1,8 @@
1FROM {{ namespace }}/{{ image_prefix }}skydive-base:{{ tag }}
2LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
3
4{% block skydive_analyzer_header %}{% endblock %}
5{% block skydive_analyzer_footer %}{% endblock %}
6{% block footer %}{% endblock %}
7
8USER skydive
diff --git a/docker/skydive/skydive-base/Dockerfile.j2 b/docker/skydive/skydive-base/Dockerfile.j2
new file mode 100644
index 0000000..ccb8dbf
--- /dev/null
+++ b/docker/skydive/skydive-base/Dockerfile.j2
@@ -0,0 +1,20 @@
1FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
2LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
3
4{% block skydive_base_header %}{% endblock %}
5
6{% import "macros.j2" as macros with context %}
7
8{{ macros.configure_user(name='skydive') }}
9
10{% if base_arch == 'x86_64' %}
11
12{% block skydive_install %}
13RUN curl -o /usr/bin/skydive -L "https://github.com/skydive-project/skydive/releases/download/v0.11.0/skydive" \
14 && chmod +x /usr/bin/skydive
15{% endblock %}
16
17{% endif %}
18
19{% block skydive_base_footer %}{% endblock %}
20{% block footer %}{% endblock %}
diff --git a/docker/swift/swift-object-expirer/Dockerfile.j2 b/docker/swift/swift-object-expirer/Dockerfile.j2
index ef1d8b2..2e2b5c4 100644
--- a/docker/swift/swift-object-expirer/Dockerfile.j2
+++ b/docker/swift/swift-object-expirer/Dockerfile.j2
@@ -7,8 +7,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
7 7
8{% if install_type == 'binary' %} 8{% if install_type == 'binary' %}
9 {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} 9 {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
10 # RDO has it packaged in the wrong package for now. The issue is being 10 # RDO packages swift-object-expirer in openstack-swift-proxy
11 # tracked in https://bugzilla.redhat.com/show_bug.cgi?id=1382921
12 {% set swift_object_expirer_packages = ['openstack-swift-proxy'] %} 11 {% set swift_object_expirer_packages = ['openstack-swift-proxy'] %}
13 {% elif base_distro in ['debian', 'ubuntu'] %} 12 {% elif base_distro in ['debian', 'ubuntu'] %}
14 {% set swift_object_expirer_packages = ['swift-object'] %} 13 {% set swift_object_expirer_packages = ['swift-object'] %}
diff --git a/docker/swift/swift-proxy-server/Dockerfile.j2 b/docker/swift/swift-proxy-server/Dockerfile.j2
index e13c6c5..4e5aaf4 100644
--- a/docker/swift/swift-proxy-server/Dockerfile.j2
+++ b/docker/swift/swift-proxy-server/Dockerfile.j2
@@ -7,13 +7,27 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
7 7
8{% if install_type == 'binary' %} 8{% if install_type == 'binary' %}
9 {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} 9 {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
10 {% set swift_proxy_server_packages = ['openstack-swift-proxy'] %} 10 {% set swift_proxy_server_packages = [
11 'openstack-swift-proxy',
12 'python-ceilometermiddleware'
13 ] %}
11 {% elif base_distro in ['debian', 'ubuntu'] %} 14 {% elif base_distro in ['debian', 'ubuntu'] %}
12 {% set swift_proxy_server_packages = ['swift-proxy'] %} 15 {% set swift_proxy_server_packages = [
16 'swift-proxy',
17 'python-ceilometermiddleware'
18 ] %}
13 {% endif %} 19 {% endif %}
14 20
15{{ macros.install_packages(swift_proxy_server_packages | customizable("packages")) }} 21{{ macros.install_packages(swift_proxy_server_packages | customizable("packages")) }}
16 22
23{% elif install_type == 'source' %}
24
25{% set swift_proxy_server_pip_packages = [
26 'ceilometermiddleware'
27] %}
28
29RUN {{ macros.install_pip(swift_proxy_server_pip_packages | customizable("pip_packages")) }}
30
17{% endif %} 31{% endif %}
18 32
19{% block swift_proxy_server_footer %}{% endblock %} 33{% block swift_proxy_server_footer %}{% endblock %}
diff --git a/kolla/common/config.py b/kolla/common/config.py
index d068e81..0e746c1 100755
--- a/kolla/common/config.py
+++ b/kolla/common/config.py
@@ -73,6 +73,7 @@ _PROFILE_OPTS = [
73 'qdrouterd', 73 'qdrouterd',
74 'rabbitmq', 74 'rabbitmq',
75 'redis', 75 'redis',
76 'skydive',
76 'tgtd', 77 'tgtd',
77 ], 78 ],
78 help='Infra images'), 79 help='Infra images'),
@@ -495,10 +496,22 @@ SOURCES = {
495 'type': 'url', 496 'type': 'url',
496 'location': ('$tarballs_base/neutron-lbaas/' 497 'location': ('$tarballs_base/neutron-lbaas/'
497 'neutron-lbaas-master.tar.gz')}, 498 'neutron-lbaas-master.tar.gz')},
498 'neutron-server-plugin-networking-odl': { 499 'neutron-server-opendaylight-plugin-networking-odl': {
499 'type': 'url', 500 'type': 'url',
500 'location': ('$tarballs_base/networking-odl/' 501 'location': ('$tarballs_base/networking-odl/'
501 'networking-odl-master.tar.gz')}, 502 'networking-odl-master.tar.gz')},
503 'neutron-server-opendaylight-plugin-networking-bgpvpn': {
504 'type': 'url',
505 'location': ('$tarballs_base/networking-bgpvpn/'
506 'networking-bgpvpn-master.tar.gz')},
507 'neutron-server-opendaylight-plugin-networking-l2gw': {
508 'type': 'url',
509 'location': ('$tarballs_base/networking-l2gw/'
510 'networking-l2gw-master.tar.gz')},
511 'neutron-server-opendaylight-plugin-networking-sfc': {
512 'type': 'url',
513 'location': ('$tarballs_base/networking-sfc/'
514 'networking-sfc-master.tar.gz')},
502 'neutron-server-plugin-neutron-dynamic-routing': { 515 'neutron-server-plugin-neutron-dynamic-routing': {
503 'type': 'url', 516 'type': 'url',
504 'location': ('$tarballs_base/neutron-dynamic-routing/' 517 'location': ('$tarballs_base/neutron-dynamic-routing/'
@@ -539,8 +552,8 @@ SOURCES = {
539 'type': 'url', 552 'type': 'url',
540 'location': ('https://nexus.opendaylight.org/content/' 553 'location': ('https://nexus.opendaylight.org/content/'
541 'repositories/opendaylight.release/org/opendaylight/' 554 'repositories/opendaylight.release/org/opendaylight/'
542 'integration/distribution-karaf/0.5.3-Boron-SR3/' 555 'integration/distribution-karaf/0.6.0-Carbon/'
543 'distribution-karaf-0.5.3-Boron-SR3.tar.gz')}, 556 'distribution-karaf-0.6.0-Carbon.tar.gz')},
544 'panko-base': { 557 'panko-base': {
545 'type': 'url', 558 'type': 'url',
546 'location': ('$tarballs_base/panko/' 559 'location': ('$tarballs_base/panko/'
@@ -843,7 +856,7 @@ USERS = {
843 'uid': 42461, 856 'uid': 42461,
844 'gid': 42461, 857 'gid': 42461,
845 }, 858 },
846 'opendaylight-user': { 859 'odl-user': {
847 'uid': 42462, 860 'uid': 42462,
848 'gid': 42462, 861 'gid': 42462,
849 }, 862 },
@@ -866,6 +879,14 @@ USERS = {
866 'sensu-user': { 879 'sensu-user': {
867 'uid': 42467, 880 'uid': 42467,
868 'gid': 42467, 881 'gid': 42467,
882 },
883 'skydive-user': {
884 'uid': 42468,
885 'gid': 42468,
886 },
887 'kuryr-user': {
888 'uid': 42469,
889 'gid': 42469,
869 } 890 }
870} 891}
871 892
diff --git a/kolla/common/task.py b/kolla/common/task.py
index 255abf8..ff23e2a 100644
--- a/kolla/common/task.py
+++ b/kolla/common/task.py
@@ -35,8 +35,3 @@ class Task(object):
35 @abc.abstractmethod 35 @abc.abstractmethod
36 def run(self): 36 def run(self):
37 pass 37 pass
38
39 @staticmethod
40 def set_status(status):
41 # TODO(harlowja): remove this.
42 pass
diff --git a/kolla/exception.py b/kolla/exception.py
index a495ba8..4b5677d 100644
--- a/kolla/exception.py
+++ b/kolla/exception.py
@@ -10,7 +10,7 @@
10# See the License for the specific language governing permissions and 10# See the License for the specific language governing permissions and
11# limitations under the License. 11# limitations under the License.
12 12
13"""Kolla exception subclasses""" 13"""Kolla exception subclasses."""
14 14
15 15
16class KollaDirNotFoundException(Exception): 16class KollaDirNotFoundException(Exception):
diff --git a/kolla/image/build.py b/kolla/image/build.py
index c8aaa8f..28e3afe 100755
--- a/kolla/image/build.py
+++ b/kolla/image/build.py
@@ -497,12 +497,8 @@ class WorkerThread(threading.Thread):
497 for attempt in six.moves.range(self.conf.retries + 1): 497 for attempt in six.moves.range(self.conf.retries + 1):
498 if self.should_stop: 498 if self.should_stop:
499 break 499 break
500 if attempt > 0: 500 LOG.info("Attempt number: %s to run task: %s ",
501 LOG.info("Attempting to run task %s for the %s time", 501 attempt + 1, task.name)
502 task.name, attempt + 1)
503 else:
504 LOG.info("Attempting to run task %s for the first"
505 " time", task.name)
506 try: 502 try:
507 task.run() 503 task.run()
508 if task.success: 504 if task.success:
@@ -647,7 +643,7 @@ class KollaWorker(object):
647 ) 643 )
648 644
649 def setup_working_dir(self): 645 def setup_working_dir(self):
650 """Creates a working directory for use while building""" 646 """Creates a working directory for use while building."""
651 if self.conf.work_dir: 647 if self.conf.work_dir:
652 self.working_dir = os.path.join(self.conf.work_dir, 'docker') 648 self.working_dir = os.path.join(self.conf.work_dir, 'docker')
653 else: 649 else:
@@ -675,7 +671,7 @@ class KollaWorker(object):
675 return filters 671 return filters
676 672
677 def _get_methods(self): 673 def _get_methods(self):
678 """Mapping of available Jinja methods 674 """Mapping of available Jinja methods.
679 675
680 return a dictionary that maps available function names and their 676 return a dictionary that maps available function names and their
681 corresponding python methods to make them available in jinja templates 677 corresponding python methods to make them available in jinja templates
@@ -764,7 +760,7 @@ class KollaWorker(object):
764 return {tpl_name: tpl_content} 760 return {tpl_name: tpl_content}
765 761
766 def find_dockerfiles(self): 762 def find_dockerfiles(self):
767 """Recursive search for Dockerfiles in the working directory""" 763 """Recursive search for Dockerfiles in the working directory."""
768 self.docker_build_paths = list() 764 self.docker_build_paths = list()
769 path = self.working_dir 765 path = self.working_dir
770 filename = 'Dockerfile.j2' 766 filename = 'Dockerfile.j2'
@@ -777,12 +773,12 @@ class KollaWorker(object):
777 LOG.debug('Found %d Dockerfiles', len(self.docker_build_paths)) 773 LOG.debug('Found %d Dockerfiles', len(self.docker_build_paths))
778 774
779 def cleanup(self): 775 def cleanup(self):
780 """Remove temp files""" 776 """Remove temp files."""
781 if not self.conf.work_dir: 777 if not self.conf.work_dir:
782 shutil.rmtree(self.temp_dir) 778 shutil.rmtree(self.temp_dir)
783 779
784 def filter_images(self): 780 def filter_images(self):
785 """Filter which images to build""" 781 """Filter which images to build."""
786 filter_ = list() 782 filter_ = list()
787 783
788 if self.regex: 784 if self.regex:
@@ -822,7 +818,7 @@ class KollaWorker(object):
822 image.status = STATUS_MATCHED 818 image.status = STATUS_MATCHED
823 819
824 def summary(self): 820 def summary(self):
825 """Walk the dictionary of images statuses and print results""" 821 """Walk the dictionary of images statuses and print results."""
826 # For debug we print the logs again if the image error'd. This is to 822 # For debug we print the logs again if the image error'd. This is to
827 # help us debug and it will be extra helpful in the gate. 823 # help us debug and it will be extra helpful in the gate.
828 for image in self.images: 824 for image in self.images:
@@ -1031,7 +1027,7 @@ class KollaWorker(object):
1031 json.dump(ancestry, sys.stdout, indent=2) 1027 json.dump(ancestry, sys.stdout, indent=2)
1032 1028
1033 def find_parents(self): 1029 def find_parents(self):
1034 """Associate all images with parents and children""" 1030 """Associate all images with parents and children."""
1035 sort_images = dict() 1031 sort_images = dict()
1036 1032
1037 for image in self.images: 1033 for image in self.images:
@@ -1044,7 +1040,7 @@ class KollaWorker(object):
1044 image.parent = parent 1040 image.parent = parent
1045 1041
1046 def build_queue(self, push_queue): 1042 def build_queue(self, push_queue):
1047 """Organizes Queue list 1043 """Organizes Queue list.
1048 1044
1049 Return a list of Queues that have been organized into a hierarchy 1045 Return a list of Queues that have been organized into a hierarchy
1050 based on dependencies 1046 based on dependencies
diff --git a/kolla/template/methods.py b/kolla/template/methods.py
index 06a97af..4e90e75 100644
--- a/kolla/template/methods.py
+++ b/kolla/template/methods.py
@@ -14,7 +14,7 @@
14 14
15 15
16def debian_package_install(packages): 16def debian_package_install(packages):
17 """Jinja utility method for building debian-based package install command 17 """Jinja utility method for building debian-based package install command.
18 18
19 apt-get is not capable of installing .deb files from a URL and the 19 apt-get is not capable of installing .deb files from a URL and the
20 template logic to construct a series of steps to install regular packages 20 template logic to construct a series of steps to install regular packages
diff --git a/releasenotes/notes/add-ceilometer-agent-ipmi-container-aa498b90c3d2f326.yaml b/releasenotes/notes/add-ceilometer-agent-ipmi-container-aa498b90c3d2f326.yaml
new file mode 100644
index 0000000..9c421f8
--- /dev/null
+++ b/releasenotes/notes/add-ceilometer-agent-ipmi-container-aa498b90c3d2f326.yaml
@@ -0,0 +1,3 @@
1---
2features:
3 - Add ceilometer agent ipmi service image
diff --git a/releasenotes/notes/add-neutron-server-opendaylight-bf8407e0b91059c4.yaml b/releasenotes/notes/add-neutron-server-opendaylight-bf8407e0b91059c4.yaml
new file mode 100644
index 0000000..f781198
--- /dev/null
+++ b/releasenotes/notes/add-neutron-server-opendaylight-bf8407e0b91059c4.yaml
@@ -0,0 +1,3 @@
1---
2features:
3 - Adds OpenDaylight specific Neutron Server container.
diff --git a/releasenotes/notes/add-openvswitch-ovn-2855384c9720161e.yaml b/releasenotes/notes/add-openvswitch-ovn-2855384c9720161e.yaml
new file mode 100644
index 0000000..7088420
--- /dev/null
+++ b/releasenotes/notes/add-openvswitch-ovn-2855384c9720161e.yaml
@@ -0,0 +1,3 @@
1---
2features:
3 - Add openvswitch ovn support to docker containers.
diff --git a/releasenotes/notes/add-skydive-52c3fb964fe6cc1b.yaml b/releasenotes/notes/add-skydive-52c3fb964fe6cc1b.yaml
new file mode 100644
index 0000000..72c0c2a
--- /dev/null
+++ b/releasenotes/notes/add-skydive-52c3fb964fe6cc1b.yaml
@@ -0,0 +1,7 @@
1---
2features:
3 - Add skydive Dockerfile.
4 With skydive, cloud operators will be able to monitor
5 and troubleshoot networking in openstack.
6 This container can then be used as a skydive analyzer
7 or as a skydive agent.
diff --git a/releasenotes/notes/dockerfile-customizations-26981ebefe3b710b.yaml b/releasenotes/notes/dockerfile-customizations-26981ebefe3b710b.yaml
index b9557e9..508d136 100644
--- a/releasenotes/notes/dockerfile-customizations-26981ebefe3b710b.yaml
+++ b/releasenotes/notes/dockerfile-customizations-26981ebefe3b710b.yaml
@@ -2,7 +2,7 @@
2prelude: > 2prelude: >
3 In Newton cycle we included means to change various things in Kolla images 3 In Newton cycle we included means to change various things in Kolla images
4 using override file. Full customization guide can be found here 4 using override file. Full customization guide can be found here
5 http://docs.openstack.org/developer/kolla/image-building.html#dockerfile-customisation 5 https://docs.openstack.org/developer/kolla/image-building.html#dockerfile-customisation
6features: 6features:
7 - Customization mechanism for dockerfile 7 - Customization mechanism for dockerfile
8 - Customization implemented in most of OpenStack services 8 - Customization implemented in most of OpenStack services
diff --git a/releasenotes/notes/vagrant-dev-env-moved-8328674713020dda.yaml b/releasenotes/notes/vagrant-dev-env-moved-8328674713020dda.yaml
new file mode 100644
index 0000000..380c97f
--- /dev/null
+++ b/releasenotes/notes/vagrant-dev-env-moved-8328674713020dda.yaml
@@ -0,0 +1,4 @@
1---
2other:
3 - The Vagrant development environment was moved to the
4 `kolla-ansible` repository.
diff --git a/requirements.txt b/requirements.txt
index 221799a..951c943 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -7,7 +7,7 @@ Jinja2!=2.9.0,!=2.9.1,!=2.9.2,!=2.9.3,!=2.9.4,>=2.8 # BSD License (3 clause)
7gitdb>=0.6.4 # BSD License (3 clause) 7gitdb>=0.6.4 # BSD License (3 clause)
8GitPython>=1.0.1 # BSD License (3 clause) 8GitPython>=1.0.1 # BSD License (3 clause)
9six>=1.9.0 # MIT 9six>=1.9.0 # MIT
10oslo.config>=3.22.0 # Apache-2.0 10oslo.config!=4.3.0,!=4.4.0,>=4.0.0 # Apache-2.0
11oslo.utils>=3.20.0 # Apache-2.0 11oslo.utils>=3.20.0 # Apache-2.0
12setuptools!=24.0.0,!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2.0,!=34.3.0,!=34.3.1,!=34.3.2,>=16.0 # PSF/ZPL 12setuptools!=24.0.0,!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2.0,!=34.3.0,!=34.3.1,!=34.3.2,>=16.0 # PSF/ZPL
13pycrypto>=2.6 # Public Domain 13pycrypto>=2.6 # Public Domain
diff --git a/setup.cfg b/setup.cfg
index 647a0a7..4eefef9 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -5,7 +5,7 @@ description-file =
5 README.rst 5 README.rst
6author = OpenStack 6author = OpenStack
7author-email = openstack-dev@lists.openstack.org 7author-email = openstack-dev@lists.openstack.org
8home-page = http://docs.openstack.org/developer/kolla/ 8home-page = https://docs.openstack.org/developer/kolla/
9license = Apache License, Version 2.0 9license = Apache License, Version 2.0
10classifier = 10classifier =
11 Environment :: OpenStack 11 Environment :: OpenStack
diff --git a/specs/containerize-openstack.rst b/specs/containerize-openstack.rst
index 89f2e71..d9b8acf 100644
--- a/specs/containerize-openstack.rst
+++ b/specs/containerize-openstack.rst
@@ -195,7 +195,7 @@ applied to every packet forwarded and returned by docker-proxy.
195If EXPOSE functionality is desired, it can be added back by 195If EXPOSE functionality is desired, it can be added back by
196referencing the default list of OpenStack ports to each Dockerfile: 196referencing the default list of OpenStack ports to each Dockerfile:
197 197
198 http://docs.openstack.org/trunk/config-reference/content/firewalls-default-ports.html 198 https://docs.openstack.org/trunk/config-reference/content/firewalls-default-ports.html
199 199
200We will use the docker flag --restart=always to provide some measure of 200We will use the docker flag --restart=always to provide some measure of
201high availability for the individual containers and ensure they operate 201high availability for the individual containers and ensure they operate
diff --git a/test-requirements.txt b/test-requirements.txt
index b8d0a01..1c485f9 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -13,13 +13,13 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
13oslo.log>=3.22.0 # Apache-2.0 13oslo.log>=3.22.0 # Apache-2.0
14oslotest>=1.10.0 # Apache-2.0 14oslotest>=1.10.0 # Apache-2.0
15oslosphinx>=4.7.0 # Apache-2.0 15oslosphinx>=4.7.0 # Apache-2.0
16reno>=1.8.0 # Apache-2.0 16reno!=2.3.1,>=1.8.0 # Apache-2.0
17PrettyTable<0.8,>=0.7.1 # BSD 17PrettyTable<0.8,>=0.7.1 # BSD
18PyYAML>=3.10.0 # MIT 18PyYAML>=3.10.0 # MIT
19python-barbicanclient>=4.0.0 # Apache-2.0 19python-barbicanclient>=4.0.0 # Apache-2.0
20python-ceilometerclient>=2.5.0 # Apache-2.0 20python-ceilometerclient>=2.5.0 # Apache-2.0
21python-heatclient>=1.6.1 # Apache-2.0 21python-heatclient>=1.6.1 # Apache-2.0
22python-neutronclient>=5.1.0 # Apache-2.0 22python-neutronclient>=6.3.0 # Apache-2.0
23python-openstackclient!=3.10.0,>=3.3.0 # Apache-2.0 23python-openstackclient!=3.10.0,>=3.3.0 # Apache-2.0
24python-swiftclient>=3.2.0 # Apache-2.0 24python-swiftclient>=3.2.0 # Apache-2.0
25pytz>=2013.6 # MIT 25pytz>=2013.6 # MIT
diff --git a/tests/test_build.py b/tests/test_build.py
index bba5101..2d99168 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -79,7 +79,6 @@ class BuildTestCentosBinary(BuildTest, base.BaseTestCase):
79 "kafka", 79 "kafka",
80 "karbor-base", 80 "karbor-base",
81 "kuryr-base", 81 "kuryr-base",
82 "manila-data",
83 "monasca-base", 82 "monasca-base",
84 "neutron-bgp-dragent", 83 "neutron-bgp-dragent",
85 "neutron-sfc-agent", 84 "neutron-sfc-agent",
@@ -209,7 +208,6 @@ class BuildTestOracleLinuxBinary(BuildTest, base.BaseTestCase):
209 "kafka", 208 "kafka",
210 "karbor-base", 209 "karbor-base",
211 "kuryr-base", 210 "kuryr-base",
212 "manila-data",
213 "monasca-base", 211 "monasca-base",
214 "neutron-bgp-dragent", 212 "neutron-bgp-dragent",
215 "neutron-sfc-agent", 213 "neutron-sfc-agent",
diff --git a/tools/deploy_aio.sh b/tools/deploy_aio.sh
index d87e93a..afe791c 100755
--- a/tools/deploy_aio.sh
+++ b/tools/deploy_aio.sh
@@ -20,9 +20,20 @@ EOF
20 openstack/kolla-ansible 20 openstack/kolla-ansible
21 21
22pushd "${KOLLA_ANSIBLE_DIR}" 22pushd "${KOLLA_ANSIBLE_DIR}"
23
23# Copy configs 24# Copy configs
24sudo cp -a etc/kolla /etc/ 25sudo cp -a etc/kolla /etc/
25# Generate passwords 26# Generate passwords
27export RAW_INVENTORY=/tmp/kolla/raw_inventory
28
29sudo ansible-playbook -i ${RAW_INVENTORY} --become tests/ansible_generate_inventory.yml
30sudo ansible-playbook -i ${RAW_INVENTORY} --become -e type=$KOLLA_TYPE -e base=$KOLLA_BASE tests/ansible_generate_config.yml > /tmp/logs/ansible/generate_config
31sudo ip l a fake_interface type dummy
32
26sudo tools/generate_passwords.py 33sudo tools/generate_passwords.py
27sudo ./tools/deploy_aio.sh "$KOLLA_BASE" "$KOLLA_TYPE" 34sudo chmod -R 777 /etc/kolla
35sudo tools/kolla-ansible -i ${RAW_INVENTORY} -vvv prechecks > /tmp/logs/ansible/prechecks1
36sudo tools/kolla-ansible -i ${RAW_INVENTORY} -vvv deploy > /tmp/logs/ansible/deploy
37sudo tools/kolla-ansible -i ${RAW_INVENTORY} -vvv post-deploy > /tmp/logs/ansible/post-deploy
38
28popd 39popd