diff --git a/Vagrantfile b/Vagrantfile index a507ecf..0bbd7b2 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -85,9 +85,6 @@ Vagrant.configure(2) do |config| node.vm.network :private_network, ip: '10.0.0.30', virtualbox__intnet: 'tunnel' - node.vm.network :public_network, - bridge: CONFIG['bridge_external'], - auto_config: false elsif name == 'storage' add_block_device(node, 1, CONFIG['resources']['storage']) end diff --git a/ansible/initialize.yaml b/ansible/initialize.yaml index b762f5c..fac6355 100644 --- a/ansible/initialize.yaml +++ b/ansible/initialize.yaml @@ -1,6 +1,8 @@ --- - lineinfile: dest=/etc/yum/pluginconf.d/fastestmirror.conf regexp=^enabled= line=enabled=0 - yum: name=* state=latest +- yum: name=http://rdo.fedorapeople.org/rdo-release.rpm state=present +- yum: name=openstack-selinux state=present - copy: src=files/id_rsa dest=/home/vagrant/.ssh/id_packstack mode=0600 owner=vagrant group=vagrant - copy: src=files/id_rsa.pub dest=/home/vagrant/.ssh/id_packstack.pub mode=0600 owner=vagrant group=vagrant - copy: src=files/selinux dest=/etc/selinux/config mode=0644 owner=root group=root diff --git a/ansible/network.yaml b/ansible/network.yaml index 6c75c7d..3cb74af 100644 --- a/ansible/network.yaml +++ b/ansible/network.yaml @@ -3,4 +3,4 @@ - yum: name=openvswitch state=present - service: name=openvswitch state=started enabled=yes - openvswitch_bridge: bridge=br-ex state=present -- openvswitch_port: bridge=br-ex port=enp0s10 state=present +- openvswitch_port: bridge=br-ex port=enp0s09 state=present diff --git a/ansible/nfs.yaml b/ansible/nfs.yaml index e6f8ba9..b498a3c 100644 --- a/ansible/nfs.yaml +++ b/ansible/nfs.yaml @@ -6,6 +6,12 @@ - copy: src=files/exports dest=/etc/exports mode=0644 owner=root group=root - service: name=rpcbind state=started enabled=yes - service: name=nfs-server state=started enabled=yes +- service: name=nfs-lock state=started enabled=yes + when: ansible_distribution_version == '7.0.1406' - service: name=rpc-statd state=started enabled=yes + when: ansible_distribution_version == '7.1.1503' +- service: name=nfs-idmap state=started enabled=yes + when: ansible_distribution_version == '7.0.1406' - service: name=nfs-idmapd state=started enabled=yes + when: ansible_distribution_version == '7.1.1503' - command: /usr/sbin/exportfs -a diff --git a/config.yaml.sample b/config.yaml.sample index 67cff4b..d85080a 100644 --- a/config.yaml.sample +++ b/config.yaml.sample @@ -1,10 +1,9 @@ --- box: - name: b1-systems/centos-packstack + name: boxcutter/centos71 storage_controller: 'SATA Controller' development: false bridge_internal: tap0 -bridge_external: tap1 network_agent: openvswitch network_type: gre netmask_internal: 255.255.0.0 diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst index ef55cf5..e632cfa 100644 --- a/doc/source/configuration.rst +++ b/doc/source/configuration.rst @@ -8,19 +8,12 @@ Base box -------- In theory (not tested) it is possible to use RHEL or Fedora instead of -CentOS. By default the box ``centos-packstack`` will be used. +CentOS. By default the box ``boxcutter/centos71`` will be used. :: box: - name: b1-systems/centos-packstack - -``centos-packstack`` is a customized version of -`boxcutter/centos70 `__. The -`Packer `__ template is available in the -`stackforge/packstack-vagrant `__ -repository and the box iself on -`Atlas `__. + name: boxcutter/centos71 To change the used base box modify the value of ``name``. A list of public available boxes is available on @@ -33,7 +26,7 @@ storage controller of the used base box must support at least three ports. :: box: - name: b1-systems/centos-packstack + name: boxcutter/centos71 storage_controller: 'SATA Controller' @@ -46,7 +39,6 @@ Bridges :: bridge_internal: tap0 - bridge_external: tap1 Addresses ~~~~~~~~~ diff --git a/doc/source/requirements.rst b/doc/source/requirements.rst index 4efc5cd..e47ef67 100644 --- a/doc/source/requirements.rst +++ b/doc/source/requirements.rst @@ -32,17 +32,3 @@ to start this Vagrant environment install Ansible on the Vagrant host. :: $ sudo yum install -y ansible - -Packer ------- - -The installation of `Packer `__ is optional and only -necessary to build the Vagrant base box ``centos-packstack`` -`provided on Atlas `__ -on a local system. - -The installation is documented in the -`Packer documentation text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/ks.cfg" - ], - "shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now", - "disk_size": 16384, - "hard_drive_interface": "sata", - "vboxmanage": [ - ["storagectl", "{{.Name}}", "--name", "SATA Controller", "--portcount", "4"] - ] - }], - "provisioners": [{ - "type": "shell", - "execute_command": "echo 'vagrant' | {{.Vars}} sudo -E -S bash '{{.Path}}'", - "scripts": [ - "scripts/update.sh", - "scripts/vbox.sh", - "scripts/sshd.sh", - "scripts/vagrant.sh", - "scripts/packstack.sh", - "scripts/cleanup.sh" - ] - }], - "post-processors": [{ - "type": "vagrant", - "keep_input_artifact": false, - "output": "centos-packstack-7.1.box" - }] -} diff --git a/packer/http/ks.cfg b/packer/http/ks.cfg deleted file mode 100644 index 3002ec6..0000000 --- a/packer/http/ks.cfg +++ /dev/null @@ -1,83 +0,0 @@ -lang en_US.UTF-8 -keyboard us -rootpw vagrant -authconfig --enableshadow --enablemd5 -timezone UTC -install -cdrom -user --name=vagrant --plaintext --password vagrant -unsupported_hardware -network --bootproto=dhcp -firewall --disabled -selinux --disabled -bootloader --location=mbr -text -skipx -zerombr -clearpart --all --initlabel -autopart --type=plain -firstboot --disabled -reboot - -%packages --nobase --ignoremissing --excludedocs -deltarpm -vim-enhanced -openssh-clients -kernel-headers -kernel-devel -gcc -make -perl -curl -wget -bzip2 -dkms -patch -net-tools -git -sudo -nfs-utils --fprintd-pam --intltool --aic94xx-firmware --atmel-firmware --b43-openfwwf --bfa-firmware --ipw2100-firmware --ipw2200-firmware --ivtv-firmware --iwl100-firmware --iwl1000-firmware --iwl105-firmware --iwl135-firmware --iwl2000-firmware --iwl2030-firmware --iwl3160-firmware --iwl3945-firmware --iwl4965-firmware --iwl5000-firmware --iwl5150-firmware --iwl6000-firmware --iwl6000g2a-firmware --iwl6000g2b-firmware --iwl6050-firmware --iwl7260-firmware --libertas-usb8388-firmware --ql2100-firmware --ql2200-firmware --ql23xx-firmware --ql2400-firmware --ql2500-firmware --rt61pci-firmware --rt73usb-firmware --xorg-x11-drv-ati-firmware --zd1211-firmware - -%end - -%post -echo "%vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant -cp /etc/sudoers /etc/sudoers.orig -sed -i "s/^\(.*requiretty\)$/#\1/" /etc/sudoers -echo 'Defaults env_keep += "HTTP_PROXY HTTPS_PROXY FTP_PROXY RSYNC_PROXY NO_PROXY"' >> /etc/sudoers -%end diff --git a/packer/scripts/cleanup.sh b/packer/scripts/cleanup.sh deleted file mode 100644 index 6a51f54..0000000 --- a/packer/scripts/cleanup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -rm -rf /dev/.udev/ -rm -rf /tmp/* -dd if=/dev/zero of=/EMPTY bs=1M -rm -f /EMPTY -sync diff --git a/packer/scripts/packstack.sh b/packer/scripts/packstack.sh deleted file mode 100644 index 64ea47f..0000000 --- a/packer/scripts/packstack.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -yum install -y http://rdo.fedorapeople.org/rdo-release.rpm -yum install -y openstack-selinux diff --git a/packer/scripts/sshd.sh b/packer/scripts/sshd.sh deleted file mode 100644 index b41c3f1..0000000 --- a/packer/scripts/sshd.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -echo "UseDNS no" >> /etc/ssh/sshd_config -echo "GSSAPIAuthentication no" >> /etc/ssh/sshd_config diff --git a/packer/scripts/update.sh b/packer/scripts/update.sh deleted file mode 100644 index e09b0a7..0000000 --- a/packer/scripts/update.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -yum update -y -reboot diff --git a/packer/scripts/vagrant.sh b/packer/scripts/vagrant.sh deleted file mode 100644 index ab5ca05..0000000 --- a/packer/scripts/vagrant.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -mkdir /home/vagrant/.ssh -wget --no-check-certificate \ - 'https://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' \ - -O /home/vagrant/.ssh/authorized_keys -chown -R vagrant /home/vagrant/.ssh -chmod -R go-rwsx /home/vagrant/.ssh diff --git a/packer/scripts/vbox.sh b/packer/scripts/vbox.sh deleted file mode 100644 index c9964c6..0000000 --- a/packer/scripts/vbox.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -VBOX_VERSION=$(cat /home/vagrant/.vbox_version) -mount -o loop /home/vagrant/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt -sh /mnt/VBoxLinuxAdditions.run --nox11 -umount /mnt -rm -rf /home/vagrant/VBoxGuestAdditions_$VBOX_VERSION.iso -rm -f /home/vagrant/.vbox_version -if [[ $VBOX_VERSION = "4.3.10" ]]; then - ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions -fi -yum -y remove gcc cpp kernel-devel kernel-headers perl