Remove Vagrant

The files for Vagrants are too outdated, this patch removes the
information about Vagrant in the documentation and the old files
used to set up a Vagrant environment.

Change-Id: Ieee7b76172874e67bb31055c0c40beb41785f7bb
This commit is contained in:
Iury Gregory Melo Ferreira 2018-10-16 15:09:58 +02:00 committed by Jim Rollenhagen
parent 596c03e9eb
commit 7a551c4f4a
4 changed files with 8 additions and 212 deletions

31
Vagrantfile vendored

@ -1,31 +0,0 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# WARNING: This Vagrantfile is for development purposes only. It is intended to
# bootstrap required services - such as mysql and rabbit - into a reliably
# accessible VM, rather than forcing the engineer to install and manage these
# services manually. This Vagrantfile is not intended to assist in provisioning
# Ironic. For that, please use the bifrost project.
VAGRANTFILE_API_VERSION = '2'
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = 'ubuntu/trusty64'
config.vm.define 'ironic' do |ironic|
ironic.vm.provider :virtualbox do |vb|
vb.customize ['modifyvm', :id, '--memory', '512', '--cpuexecutioncap', '25']
end
ironic.vm.network 'private_network', ip: '192.168.99.11' # It goes to 11.
ironic.vm.provision 'ansible' do |ansible|
ansible.verbose = 'v'
ansible.playbook = 'vagrant.yaml'
ansible.extra_vars = {
ip: '192.168.99.11'
}
end
end
end

@ -207,29 +207,9 @@ Step 1: Create a Python virtualenv
export OS_TOKEN=fake-token
export OS_URL=http://localhost:6385/
Next, install and configure system dependencies. Two different approaches are
described below; you should only do one of these.
Next, install and configure system dependencies.
Step 2a: System Dependencies In A Virtual Machine
-------------------------------------------------
This option requires `virtualbox <https://www.virtualbox.org>`_,
`vagrant <https://www.vagrantup.com>`_, and
`ansible <https://www.ansible.com>`_. You may install these using your
favorite package manager, or by downloading from the provided links.
#. Let vagrant do the work::
vagrant up
This will create a VM available to your local system at `192.168.99.11`,
will install all the necessary service dependencies,
and configure some default users. It will also generate
`./etc/ironic/ironic.conf.local` preconfigured for local dev work.
We recommend you compare and familiarize yourself with the settings in
`./etc/ironic/ironic.conf.sample` so you can adjust it to meet your own needs.
Step 2b: Install System Dependencies Locally
Step 2: Install System Dependencies Locally
--------------------------------------------
This option will install RabbitMQ and MySQL on your local system. This may not

@ -0,0 +1,6 @@
---
other:
- |
Removes Vagrant files and the information in documentation since
the files were too outdated. This would lead to errors if developers
tried to set up an environment with Vagrant.

@ -1,159 +0,0 @@
---
###############################################################################
# This ansible playbook installs all supporting software necessary to run the
# ironic service locally into the vagrant VM attached. Its intent is to provide
# a quickstart development environment that doesn't pollute an engineer's own
# machine.
#
# The vagrant vm's IP address is assumed to be 192.168.99.11
#
# https://docs.openstack.org/ironic/latest/contributor/dev-quickstart.html#exercising-the-services-locally
#
- hosts: ironic
sudo: yes
tasks:
############################################################################
# APT Updates
############################################################################
# Make sure our VM's software is ~@Latest
- name: Apt Update
apt: update_cache=yes
upgrade=dist
cache_valid_time=86400
# Reboot if required.
- name: Reboot system if required
command: shutdown -r now 'Rebooting to complete system upgrade'
removes=/var/run/reboot-required
register: rebooted
- name: Wait for VM Reboot.
sudo: no
local_action: wait_for
port=22
host="{{ip}}"
search_regex=OpenSSH
delay=10
timeout=900
when: rebooted.changed
############################################################################
# Install all the needed packages in one go.
############################################################################
- name: Install Required Packages
apt: name={{item}}
state=present
with_items:
- rabbitmq-server
- python-mysqldb
- mysql-server
- mysql-client
############################################################################
# Configure rabbitmq.
############################################################################
- name: Ensure rabbitmq is running
service: name=rabbitmq-server
state=started
enabled=yes
- name: Add ironic RabbitMQ user
rabbitmq_user: user=ironic
password=ironic
vhost=/
configure_priv=.*
read_priv=.*
write_priv=.*
state=present
############################################################################
# Configure mysql.
############################################################################
- name: Configure MySQL
lineinfile: dest=/etc/mysql/my.cnf
line="bind-address={{ip}}"
regexp="^bind\-address"
notify: Restart MySQL
- name: Create MySQL Database
mysql_db: name=ironic state=present
- name: Create ironic MySQL user
mysql_user: name=ironic
password=ironic
host={{item}}
priv=ironic.*:ALL
state=present
with_items:
- localhost
- "%"
- name: Ensure mysql is running
service: name=mysql
state=started
enabled=yes
############################################################################
# Create ironic.conf.local configuration.
############################################################################
- name: Update local configuration with vagrant parameters.
sudo: no
local_action: ini_file dest=etc/ironic/ironic.conf.local
section="{{item.section}}"
option="{{item.option}}"
value="{{item.value}}"
with_items:
- {
section: 'glance',
option: 'auth_strategy', value: 'noauth'
}
- {
section: 'neutron',
option: 'auth_strategy', value: 'noauth'
}
- {
section: 'database',
option: 'connection', value: "mysql+pymysql://ironic:ironic@{{ip}}/ironic"
}
- {
section: 'DEFAULT',
option: 'auth_strategy', value: 'noauth'
}
- {
section: 'DEFAULT',
option: 'enabled_drivers', value: 'pxe_ipmitool, agent_ipmitool, fake'
# All other testing drivers require add'l packages
# and should be enabled locally, if desired
}
- {
section: 'DEFAULT',
option: 'pecan_debug', value: 'true'
}
- {
section: 'DEFAULT',
option: 'verbose', value: 'true'
}
- {
section: 'DEFAULT',
option: 'debug', value: 'true'
}
- {
section: 'oslo_messaging_rabbit',
option: 'rabbit_host', value: "{{ip}}"
}
- {
section: 'oslo_messaging_rabbit',
option: 'rabbit_userid', value: "ironic"
}
- {
section: 'oslo_messaging_rabbit',
option: 'rabbit_password', value: "ironic"
}
- { # CORS Domain For Ironic-Webclient's dev server.
section: 'cors',
option: 'allowed_origin', value: "http://localhost:8000"
}
#############################################################################
# Handlers
#############################################################################
handlers:
- name: Restart MySQL
service: name=mysql
state=restarted
enabled=yes