Improve Vagrantfile, add development configuration
Adds commands to install dependencies, and setup a virtualenv with kayobe installed. Configuration is provided in dev/ for a single controller with a single network.
This commit is contained in:
parent
f611fa16b2
commit
dc2ea4c1e5
29
Vagrantfile
vendored
29
Vagrantfile
vendored
@ -26,7 +26,7 @@ Vagrant.configure("2") do |config|
|
||||
|
||||
# Create a private network, which allows host-only access to the machine
|
||||
# using a specific IP.
|
||||
# config.vm.network "private_network", ip: "192.168.33.10"
|
||||
config.vm.network "private_network", ip: "192.168.33.3"
|
||||
|
||||
# Create a public network, which generally matched to bridged network.
|
||||
# Bridged networks make the machine appear as another physical device on
|
||||
@ -64,8 +64,27 @@ Vagrant.configure("2") do |config|
|
||||
# Enable provisioning with a shell script. Additional provisioners such as
|
||||
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
|
||||
# documentation for more information about their specific syntax and use.
|
||||
# config.vm.provision "shell", inline: <<-SHELL
|
||||
# apt-get update
|
||||
# apt-get install -y apache2
|
||||
# SHELL
|
||||
#
|
||||
# Set privileged: false to run as vagrant user.
|
||||
config.vm.provision "shell", privileged: false, inline: <<-SHELL
|
||||
sudo ifup eth1
|
||||
|
||||
sudo yum -y install gcc git vim python-virtualenv
|
||||
|
||||
cat > /vagrant/kayobe-env << EOF
|
||||
export KAYOBE_CONFIG_PATH=/vagrant/etc/kayobe
|
||||
export KOLLA_CONFIG_PATH=/vagrant/etc/kolla
|
||||
EOF
|
||||
source /vagrant/kayobe-env
|
||||
|
||||
cp /vagrant/dev/dev-vagrant.yml /vagrant/etc/kayobe/
|
||||
cp /vagrant/dev/dev-hosts /vagrant/etc/kayobe/inventory
|
||||
cp /vagrant/dev/dev-vagrant-network-allocation.yml /vagrant/etc/kayobe/network-allocation.yml
|
||||
|
||||
virtualenv ~/kayobe-venv
|
||||
source ~/kayobe-venv/bin/activate
|
||||
pip install -U pip
|
||||
pip install /vagrant
|
||||
deactivate
|
||||
SHELL
|
||||
end
|
||||
|
2
dev/dev-hosts
Normal file
2
dev/dev-hosts
Normal file
@ -0,0 +1,2 @@
|
||||
[controllers]
|
||||
controller0 ansible_host=192.168.33.3
|
2
dev/dev-vagrant-network-allocation.yml
Normal file
2
dev/dev-vagrant-network-allocation.yml
Normal file
@ -0,0 +1,2 @@
|
||||
aio_ips:
|
||||
controller0: 192.168.33.3
|
59
dev/dev-vagrant.yml
Normal file
59
dev/dev-vagrant.yml
Normal file
@ -0,0 +1,59 @@
|
||||
---
|
||||
# Development configuration for Kayobe on Vagrant.
|
||||
# Configures a single controller with a single network (aio).
|
||||
|
||||
# No need to provide a different user for bootstrapping.
|
||||
controller_bootstrap_user: vagrant
|
||||
|
||||
# Don't create any LVM groups.
|
||||
controller_lvm_groups: []
|
||||
|
||||
# Use the overlay docker storage driver as it doesn't require LVM.
|
||||
docker_storage_driver: overlay
|
||||
|
||||
# Use the vagrant user to access the controller via SSH.
|
||||
kayobe_ansible_user: vagrant
|
||||
|
||||
# Use the 4.0.2 release of kolla and kolla-ansible.
|
||||
kolla_openstack_release: 4.0.2
|
||||
|
||||
# Kolla container image extensions.
|
||||
kolla_build_blocks:
|
||||
ironic_base_footer: |
|
||||
# Install a more recent version of ironic-lib with a fix for
|
||||
# https://bugs.launchpad.net/ironic/+bug/1673731.
|
||||
RUN pip install -U --no-deps ironic-lib==2.7.0
|
||||
|
||||
# Kolla container image customisations.
|
||||
kolla_build_customizations:
|
||||
ironic_conductor_packages_append:
|
||||
# e2fsprogs is required to create ext ephemeral filesystems.
|
||||
- 'e2fsprogs'
|
||||
# xfsprogs is required to create XFS ephemeral filesystems.
|
||||
- 'xfsprogs'
|
||||
|
||||
# Disable swift.
|
||||
kolla_enable_swift: False
|
||||
|
||||
# Map all networks to the all-in-one network.
|
||||
oob_oc_net_name: aio
|
||||
provision_oc_net_name: aio
|
||||
oob_wl_net_name: aio
|
||||
provision_wl_net_name: aio
|
||||
internal_net_name: aio
|
||||
external_net_name: aio
|
||||
storage_net_name: aio
|
||||
storage_mgmt_net_name: aio
|
||||
inspection_net_name: aio
|
||||
|
||||
# All-in-one network.
|
||||
aio_cidr: 192.168.33.0/24
|
||||
aio_gateway: 192.168.33.1
|
||||
aio_allocation_pool_start: 192.168.33.3
|
||||
aio_allocation_pool_end: 192.168.33.254
|
||||
aio_vip_address: 192.168.33.2
|
||||
|
||||
# Controller interface on all-in-one network.
|
||||
aio_interface: breth1
|
||||
aio_bridge_ports:
|
||||
- eth1
|
Loading…
Reference in New Issue
Block a user