Commit Graph

58 Commits

Author SHA1 Message Date
Matthew Montgomery
cd8f68b43e Vagrant plugin check
- Adds support for validating that all required Vagrant plugins have
  been installed.

Closes-Bug: 1606575
Change-Id: I06002ef9d43d081b5ae9f326377e5009b4e62e36
2016-07-26 08:36:38 -05:00
Paul Bourke
a43a8d77a9 Fix docker daemon proxy support in vagrant
There was an unwanted line break in the systemd file preventing the proxy from
being configured correctly.

TrivialFix

Change-Id: I3e6413d4f2d373951cb558e0af1b8bc92d4cbb91
2016-06-23 11:40:08 +01:00
Michal Rostecki
9895e98d17 Use MAC address for looking for DHCP leases for Vagrant
Change-Id: If87e83f7a50c0341f4b1238310eb1469eea0f767
Closes-Bug: 1570739
2016-06-21 04:58:27 +00:00
Martin André
aba8add541 Connect to remote hosts as root
Since this is the user for which we setup the SSH key.

This commit allows to run kolla-ansible as vagrant user without using
sudo.

This only applies to multinode.

TrivialFix

Change-Id: Ie5231085a66511a520d4dbe5e9f35414acf1900b
2016-06-17 16:47:40 +02:00
Martin André
5f79732927 Only keep localhost for 127.0.0.1
The regex used previously would keep the short hostname (hostname -s)
on the 127.0.0.1 line.

Reset the 127.0.0.1 line to keep only localhost.

TrivialFix

Change-Id: I90bdec6793ac5b2d304e178e5114369b7b3b9626
2016-06-17 16:04:47 +02:00
Martin André
cbd67d3cf7 Remove unused SUPPORT_NODE variable
The SUPPORT_NODE variable was missed during a refactoring of
bootstrap.sh and is now unused. Remove it.

TrivialFix

Change-Id: I10ab4368b383dbb620916f70c368153403944001
2016-06-17 14:50:01 +02:00
Martin André
5718356eb2 Set internal vip to vagrant private network
In vagrant environments, the kolla_internal_vip_address didn't belong
to the private network provisioned on the machine and was failing the
prechecks.

TrivialFix

Change-Id: I0e7e4d134e350c49ef7510c7262677754a83bcbf
2016-06-17 14:46:58 +02:00
Martin André
acfe3b73aa Refer to operator VM as primary VM
This allows us to execute vagrant commands by default on the 'operator'
VM and eliminate one of the difference between AIO and multinode.

TrivialFix

Change-Id: Ia14aa026d1146ec4b1e006c72a2460edfc0cf6eb
2016-06-17 14:38:51 +02:00
Jenkins
383730443c Merge "Update ubuntu dockerfiles for formatting" 2016-05-26 11:13:10 +00:00
Jenkins
6f5239ce40 Merge "Bump the ansible to 2" 2016-05-26 10:57:27 +00:00
Swapnil Kulkarni (coolsvap)
435b21b90d Update ubuntu dockerfiles for formatting
Change-Id: If4be00b937e14ec93443dcb7249cf17099d57cbe
Closes-Bug: #1569417
2016-05-26 04:09:22 +00:00
Jeffrey Zhang
491822c510 Bump the ansible to 2
DocImpact

Change-Id: I3cdfbf84919de80f535c030bd146787ecda40dec
partial-Implements: blueprint ansible2
2016-05-24 19:53:31 +08:00
Paul Bourke
d2a62c96cd Improve Vagrants bootstrap.sh proxy support
* sudo is not needed as script already runs as root, using sudo would
  require http_* env vars to be carried through.

* Add a systemd unit file to configure docker proxy support

* Update /etc/bashrc if available proxy

TrivialFix

Change-Id: If2571389ec3dc5bce9e819acf962d202b3166b97
2016-05-18 10:56:44 +01:00
Swapnil Kulkarni (coolsvap)
fc8d716316 Update remaining files for formatting
Change-Id: Ie9fc941bb48edf86b00fc1f2dba0b83b675a5a1c
Partial-Bug:#1569417
2016-04-21 12:03:42 +00:00
Gerard Braad
0dcb83030d Use packaged pip instead of easy_install
TrivialFix

Change-Id: I1eefec4326f97f466243051bcc33551e0803980d
2016-03-28 03:24:56 +00:00
SamYaple
f03e06e09b Add generate_passwords.py to generate passwords
As with all tools, this is a first pass at the generation. Perhaps we
even want to move this into kolla/kolla/cmd and be generated with tox
itself in the future.

This tool, when run, will only populate empty fields that have no
values meaning that it is safe to run repeatedly on the same file.

Of note, there is no way to preserve comments in the file after it has
been processed by the yaml parser in python. Comments and sections
will remain in the passwords.yml template for additional documentation
if the user wishes to populate the file themselves.

Use SystemRandom and clean up the docs a bit to not use pronouns.

Co-Authored-By: Steven Dake <stdake@cisco.com>

Closes-Bug: #1559266
Change-Id: I2932d592df8871f1b7811059206d0b4d0553a687
2016-03-21 17:02:23 +00:00
Andrei-Lucian Șerb
3b12b7b951 Attach external NIC to a NAT-Network if on Wi-Fi
On computers with wi-fi adapters, promiscuous mode on the VirtualBox (or
maybe other hypervisors as well) NICs does not work, which means the
default way of connecting the Neutron external interface to a bridged
adapter, will not allow communication to and from the Nova VMs over
floating IPs with any computer on the external network (except the host
computer) or with the wi-fi router. This means no ability to connect to
the Nova VMs and no internet access inside the Nova VMs.

According to VirtualBox documentation (excerpt): "Bridging to a wireless
interface is done differently from bridging to a wired interface,
because most wireless adapters do not support promiscuous mode. All
traffic has to use the MAC address of the host’s wireless adapter, and
therefore VirtualBox needs to replace the source MAC address in the
Ethernet header of an outgoing packet to make sure the reply will be
sent to the host interface. When VirtualBox sees an incoming packet with
a destination IP address that belongs to one of the virtual machine
adapters it replaces the destination MAC address in the Ethernet header
with the VM adapter’s MAC address and passes it on. VirtualBox examines
ARP and DHCP packets in order to learn the IP addresses of virtual
machines."

To fix this issue, a new flag has been introduced: WIFI. If true, the
default Vagrant public network is not created anymore. Instead, the 3rd
NIC will be connected to a NAT-Network named OSNetwork. The NAT-Network
has a virtual gateway, which will be used to communicate with the
external physical wi-fi router. Since Vagrant does not have a high-level
mechanism to attach an adapter to a NAT-Network, the code uses the
low-level Vagrant construct vm.customize which makes it provider
specific.

Promiscuous mode is now activated by default on the 3rd NIC.

The WIFI flag is false by default.

This commit only addresses VirtualBox, and it is currently unknown if
the problem described and fixed in this commit is present in other
hypervisors.

DocImpact
Closes-Bug: #1558766
Change-Id: I0b4dbbc562d87191b2179f47b634cdd6f6361a5e
Signed-off-by: Andrei-Lucian Șerb <lucian.serb@icloud.com>
2016-03-21 01:08:45 +02:00
Jenkins
1c0082169c Merge "Fix host_manager plugin for vagrant virtualbox" 2016-03-16 08:28:10 +00:00
Martin André
21bade35ba Fix genconfig on vagrant
We run tox at the root of the home directory, so we need to pass it the
path to the tox.ini file.

TrivialFix

Change-Id: Ieb52d845b77f556aee5cd194a8ef86561b7849b2
2016-03-16 09:22:02 +09:00
Martin André
14da78f9f1 Fix host_manager plugin for vagrant virtualbox
There is no such thing as virtualbox_{ubuntu,centos} but only
a virtualbox provider. The code to retrieve the VM's IP address was
never executed and broke host_manager plugin.

TrivialFix

Change-Id: I0ffacf0bd5d2856264247b23e3b3e918836988e3
2016-03-16 09:20:11 +09:00
Daniel Gonzalez
5960900f9a Unify vagrant bootstrap.sh scripts
Merge the vagrant bootstrap scripts for centos and ubuntu into a single
file.

Change-Id: Ia07931b4717cd393fe51141907fc561166cc05e4
Closes-Bug: 1554140
2016-03-15 04:16:49 +01:00
Martin André
29b4e8756d Stop shipping broken openrc in vagrant
Instead, rely on kolla-ansible post-deploy to generate a configuration
file with valid environment variables.

Change-Id: Ie62932afc96e2486410a1d4e14162a88b1733c22
Closes-Bug: #1555972
2016-03-11 17:14:03 +09:00
Martin André
f043d6ea7b Simplify logic of vagrantfile
TrivialFix

Change-Id: I0af5d5a80f28d8cb8b5f0e7799fd87bcd73e09cf
2016-03-03 17:31:53 +09:00
Éric Lemoine
558b900e83 Make Vagrant libvirt graphics_ip configurable
TrivialFix

Change-Id: I5c6153016f15b8a0922bdb28c4a03de561b240ee
2016-03-02 09:09:33 +01:00
Éric Lemoine
9544166c4b Fix issue in newest_dhcp_lease.py
This fixes a bug in newest_dhcp_lease.py where the get_mac_address
function currently searches for a "bridge" interface instead of
searching for the interface whose source network is
"vagrant-private-dhcp".

Change-Id: Iea0b25f893b959b5e319b117e7a1c4c63a00dd23
Closes-Bug: #1548742
2016-02-26 15:48:51 +01:00
Sam Song
2b249272c0 Fix a typo in the vagrant bootstrap scripts
Change-Id: I90e053a8c5810dec69bd5087ddd8e31c037e6a41
2016-02-24 17:54:00 +08:00
Daniel Gonzalez
aaa38eaf5b Fix vagrant bootstrapping for ubuntu
The ubuntu-bootstrap.sh script used by vagrant to provision ubuntu
boxes was lacking many of the features of centos-bootstrap.sh. For
instance, ubuntu-bootstrap.sh did not install kolla, so the kolla-build
executable was not available after initial provisioning.
This patch adapts the bootstrap script to match the centos bootstrap
script as closely as possible.

Change-Id: I6cdacb993a9b6856912ea7cfb73a28f3867f472a
Closes-Bug: #1547114
2016-02-23 08:10:54 +01:00
Daniel Gonzalez
1665f5007d Harmonise vagrant provider defaults
Ensure that provider defaults of libvirt and virtualbox use the same
paths and provisioning scripts.

Change-Id: Ie968b118aa0540204751c348ef3408a6fe24d32a
Partial-Bug: #1547114
2016-02-22 14:15:20 +01:00
Daniel Gonzalez
e970d8b5bf Change ubuntu base_image for vagrant to wily64
The ubuntu-bootstrap.sh script tries to install the packet
linux-image-generic-ls-wily when the kernel version is older than 4.2.
This fails when using the default base image ubuntu/vivid64. Therefore
this patch updates the base_image to ubuntu/wily64.

Change-Id: Ieaf2d35a9a4304de2d1d78d8245d115dcb32bb0e
Partial-Bug: #1547114
2016-02-22 14:15:20 +01:00
Martin André
076fb5a646 Set nova hypervisor to qemu in Vagrant
Additionally, install python-neutronclient that is needed for
tools/init-runonce.

Change-Id: I416afc0299c8e6a8e603eca2334ea3a9836707fe
Partial-Bug: #1542933
2016-02-18 14:29:09 +09:00
Dave McCowan
1cedf77f19 Use variables to specify http or https when constructing URLs
To allow for TLS to protect the service endpoints, the protocol
in the URLs for the endpoints will be either http or https.

This patch removes the hardcoded values of http and replaces them
with variables that can be adjusted accordingly in future patches.

Change-Id: Ibca6f8aac09c65115d1ac9957410e7f81ac7671e
Partially-implements: blueprint ssl-kolla
2016-02-15 09:48:58 -05:00
Martin André
ef9aca2f63 Switch to docker registry v2
With docker 1.10, the v2 registry finally has decent performances.

TrivialFix

Change-Id: I85fde385dba3579abad497e327170d30b8b9fc7c
2016-02-09 14:26:10 +09:00
Martin André
e715856f52 Fetching IP addresses for vagrant-hostmanager from libvirt
To fetch the IP address from the interface other than eth0 for
vagrant-hostmanager plugin, it must be fetched from the DHCP
leases from libvirt network. The previously used one-liner,
which was using virsh with awk, returns multiple addresses
when VM was destroyed before expiration of its DHCP lease.

This script solved this problem by getting only the newest
DHCP lease and gives a possibility to destroy Vagrant
environment and set up again without worrying about hosts
resolving.

Co-Authored-By: Michal Rostecki <mrostecki@mirantis.com>
Partially-Implements: blueprint vagrant
Related-Id: Ic469b46f4d02d873c27114cbd268b86521eef32b
Related-Id: I81f07b7e4a202af68fd3cf9fdb308c3734c40a83

Change-Id: I408415e95483c1b8988d0f67c654212de63bece2
2016-02-09 14:25:22 +09:00
Martin André
31e0b3454c Fix Vagrant provisioning with docker 1.10
docker 1.10 removed the -d flag in favor of "daemon". Also adjust
docker config to enable shared mount namespace.

Closes-Bug: #1543201

Change-Id: I14cb497e0e02d90cdf74de8a09cca346f68254ab
2016-02-09 11:23:24 +09:00
MD NADEEM
354e674ded Update kernel version in ubuntu-bootstrap.sh
Ubuntu-bootstrap.sh script rebooted my server
with message of re-run the script and at re-run
it again do the same thing.

I find this behavior is due to the below check

if [[ $(uname -r) != *"3.19"* ]]

As latest ubuntu kernel version is 4.2.0-27-generic,
so we should update the script for kernel version
4.2.0-27-generic.

This patch fixes the issue.
Closes-Bug: #1541797
Change-Id: I01e98d80df60fe8c5f6ac6e644d42261fdd2921c
2016-02-04 12:41:26 +00:00
Marc Koderer
9531b0613b Adapt openrc file to use keystone v3
Ansible adminrc file already uses v3 as default. So let's
to that in vagrant too.

See file:
ansible/roles/common/templates/admin-openrc.sh.j2

TrivialFix

Change-Id: I23b7ff81808ddc718ae1186887e9764ebc5ab6ef
2016-01-19 14:16:36 +00:00
Marc Koderer
9431ab62af Rename bootstrap.sh to centos-bootstrap.sh
Since Ubuntu and Centos are both valid options it's better
to list their names in both bootstrap files

Trivial-fix

Change-Id: Ie8179403ba550ff61a45aa936fb87e02b9f74861
2016-01-18 14:05:03 +01:00
Marc Koderer
3f4873696c Fix centos AiO setup
LVM2 must be upgraded before device-mapper.
Otherwise the setup fails.

Change-Id: I97f57c1c8fd50621ad7fa0ddf296cc987c227cd2
Fixes-bug: #1534549
2016-01-15 11:59:26 +01:00
Jeffrey Zhang
781eefeccf Remove the kolla-build.conf
use tox -e genconfig to generate this file

DocImpact

Closes-Bug: #1531202
Change-Id: I3a6e57c3cc48aeb3a45a055b173207ea6e214960
2016-01-07 21:06:22 +08:00
Martin André
3aeec10b88 Be more specific in regex used in sed
We want to change *only* the desired option.

Change-Id: Ic67ba474569f6bf7d74bd710364f26be0f0363eb
Close-Bug: #1531046
2016-01-05 11:29:54 +09:00
Jenkins
63f0794851 Merge "Set selinux to permissive in Vagrant" 2016-01-04 11:08:15 +00:00
Martin André
6d7d487601 Set selinux to permissive in Vagrant
Selinux is preventing to write on mounted volumes. Let's set it to
permissive in Vagrant box provisioning.

Change-Id: If8ea57f242166eb6f4ef618639d4ab672e5098d3
Closes-Bug: #1530766
2016-01-04 15:25:22 +09:00
Martin André
f7c196281c Remove docker version pinning for vagrant envs
Kolla now has its own docker ansible module which doesn't require
specific docker version.

Also, add requirement for ansible <2, and stop using NL mirror for
epel.

Change-Id: I743c51c2d6b7f6af0aa4038e1081066b36e36fa1
Partially-Implements: blueprint kolla-docker-module
2016-01-04 11:52:46 +09:00
Diogo Monteiro
c7297e04c1 Update Vagrant's Ubuntu box provisioning script
Starting from Vivid Ubuntu uses systemd as the
default boot manager instead of upstart. Updating
the way the docker daemon is configured to follow
the systemd way.
Setting env variable GUNICORN_OPTS=[--preload]
to fix race condition and avoid IntegrityError
when pushing images to local registry

Change-Id: I841f85015c2c3683ef7e1e454ec1369263063c45
Related-bug: https://github.com/docker/docker-registry/issues/518
Closes-Bug: #1523336
2015-12-07 10:18:40 -05:00
Martin André
5eb67e275e Allow to customize vagrant deployment
Extract the Vagrantfile configuration to a Vagrantfile.custom file, to
permit easy customization of the Vagrant deployment without the need to
modify a file under version control.

Closes-Bug: #1517475
Change-Id: I03e3ef373ec47e3d622b77fa9cf88748db99adaa
2015-11-18 22:39:34 +09:00
Martin André
988ee296d6 Factor out definition of nodes in Vagrantfile
All the nodes, with the exception of the operator, are build the same
with maybe different specs. We can remove the duplication with a bit of
metaprogramming.

Also pass all expected arguments to the provisionning script,and get
rid of hardcoded path to it.

Closes-Bug: #1517476

Change-Id: I515ef1d529d7ec49038662001a3e5345a941fea7
2015-11-18 22:39:06 +09:00
Jenkins
d1a0aa76ea Merge "Remove "../../etc/kolla" from synced folders in Vagrant" 2015-11-18 12:19:49 +00:00
Michal Rostecki
c909d1c50c Remove "../../etc/kolla" from synced folders in Vagrant
That sync broke copying configuration files in Ansible playbooks
and made all changes of configuration inside VM as a change in
kolla git repo on host.

Change-Id: I21ecd9a48c0c3263c05f5dbefea7bbc78a919f0a
Closes-Bug: #1515901
2015-11-18 12:07:16 +09:00
Martin André
70074abd07 Make vagrant bootstrap scripts args more obvious
Also add missing curly braces around variables.

TrivialFix

Change-Id: I8798ec52d9ddf76ad1f3debdf087ed4f51defc38
2015-11-18 11:02:52 +09:00
Diogo Monteiro
d2b388d55c Get kolla path from settings when provisioning box
The path for the kolla source dir was being
hardcoded on the ubuntu-bootstrap provision script
instead of utilizing the path defined in the
PROVIDER_DEFAULTS settings in the Vagrantfile

Change-Id: I0eb752ecf4db580838687c290ccf36810e8a4ff3
2015-11-12 08:55:57 -05:00