Removed a virtual build and test environment based on Vagrant.

The virtual build and test environment based on Vagrant is out of date.

Change-Id: I8c855f9a92894d1c160a2bc8461a2883eb4950a9
This commit is contained in:
Christian Berendt 2015-10-30 03:41:55 +01:00
parent 67be882cc6
commit b8161e3aff
9 changed files with 5 additions and 241 deletions

View File

@ -1,6 +1,11 @@
Release notes
=============
0.32.0
------
* Removed a virtual build and test environment based on Vagrant.
0.31.0
------

View File

@ -1,80 +0,0 @@
# Virtual build and testing environment
This is a virtual building and testing environment for the
OpenStack manuals using Vagrant to simplify the work.
## Getting started with Vagrant
* download a Vagrant package from http://www.vagrantup.com/downloads.html
* install and configure Vagrant like described
at http://docs.vagrantup.com/v2/installation/index.html
## Build your own environment
To manually build your own environment you have to follow the following
steps.
Ansible (http://www.ansible.com/home) needs to be installed on the
workstation.
```
$ git clone https://github.com/openstack/openstack-doc-tools
$ cd openstack-doc-tools/build_environment
$ vagrant up
```
After ```vagrant up``` successfully finished you can login with
```vagrant ssh```. The virtual system can be destroyed with
```vagrant destroy```.
## Use the Vagrantbox from the VagrantCloud
Using the prebuilt box for VirtualBox on the VagrantCloud saves
a lot of time and you don't need to install Ansbile. Simply
follow the following steps:
```
$ vagrant box add openstack/openstack-manuals
$ mkdir /path/to/your/vagrantbox
$ cd /path/to/your/vagrantbox
$ vagrant init openstack/openstack-manuals
$ vagrant up
```
## Usage
To test and build the documents login into the box. The generated
files are browsable at http://localhost:8080/.
```
$ vagrant ssh
```
Go into the repositories located in ```/home/vagrant/repositories```
and build the documents with ```mvn clean generate-sources```.
To edit the documents and to commit changes you can use the toolchain
on the workstation. All repositories can be found in the local
directory ```repositories```. This directory is available inside the
virtual system at ```/home/vagrant/repositories```.
## Included repositories
* api-site
* compute-api
* docs-specs
* ha-guide
* identity-api
* image-api
* netconn-api
* object-api
* openstack-doc-tools
* openstack-manuals
* operations-guide
* security-doc
* training-guides
* volume-api
## Caveats
* At the moment the only tested provider is VirtualBox.

View File

@ -1,32 +0,0 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.hostname = "manuals.site"
config.vm.provider "virtualbox" do |vb|
vb.customize ['modifyvm', :id, '--memory', 1024]
vb.customize ['modifyvm', :id, '--cpus', 2]
end
# access the webserver from your workstation
config.vm.network "forwarded_port", guest: 80, host: 8080
# create the local repositories directory (available as /opt/repositories
# inside the virtual system)
Dir.mkdir('repositories') unless Dir.exists?('repositories')
# repositories live here
config.vm.synced_folder "repositories", "/home/vagrant/repositories"
# cache distribution packages when cachier plugin is available
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
end
# provision the virtual system using Ansible
config.vm.provision "ansible" do |ansible|
ansible.playbook = "files/playbook.yaml"
end
end

View File

@ -1,25 +0,0 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# NOTE(berendt): This is the Vagrantfile included with the box provided
# on the Vagrant cloud as openstack/openstack-manuals. The
# box is created with the script package.sh.
filename = File.expand_path("../repositories.tar.bz2", __FILE__)
if not File.exists?('repositories/.placeholder')
system("tar xjf #{filename}")
end
Vagrant.configure(2) do |config|
config.vm.box = "openstack/openstack-manuals"
config.vm.hostname = "manuals.site"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.provider "virtualbox" do |vb|
vb.customize ['modifyvm', :id, '--memory', 1024]
vb.customize ['modifyvm', :id, '--cpus', 2]
end
config.vm.synced_folder "repositories", "/home/vagrant/repositories", create: true
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
end
end

View File

@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Just a helper script to package a running Vagrant environment.
if [[ -z $1 ]]; then
echo "usage: $0 VERSION"
exit 1
fi
version=$1
rm -f working.tar.bz2
touch working/.placeholder
tar cjf working.tar.bz2 working
vagrant package \
--output=openstack-manuals-$version.box \
--vagrantfile=Vagrantfile.box \
--include working.tar.bz2

View File

@ -1,16 +0,0 @@
#!/usr/bin/env bash
set -x
# This script downloads all dependencies to be able
# to build the documents.
for repository in $(ls -d -1 /home/vagrant/repositories/*); do
cd $repository
for document in $(find . -name pom.xml); do
pushd ${document%/*};
mvn clean generate-sources
mvn clean
popd
done
done

View File

@ -1,22 +0,0 @@
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /home/vagrant/repositories;
index index.html index.htm;
server_name manuals.site;
location / {
autoindex on;
autoindex_exact_size on;
try_files $uri $uri/ =404;
}
location /openstack-manuals/doc {
index local-files.html;
autoindex on;
autoindex_exact_size on;
try_files $uri $uri/ =404;
}
}

View File

@ -1,48 +0,0 @@
---
- hosts: all
sudo: True
tasks:
- apt: update_cache=yes
- apt: upgrade=dist
- apt: name={{ item }} state=present
with_items:
- git
- git-review
- maven
- nginx
- python-tox
- copy: src=nginx.default dest=/etc/nginx/sites-available/default
notify: restart nginx
- service: name=nginx enabled=yes state=started
- copy: src=fetch.sh dest=/usr/local/bin/fetch.sh mode=0755
- lineinfile: dest=/etc/environment regexp='^JAVA_HOME=' line='JAVA_HOME=/usr/lib/jvm/default-java'
sudo: True
- git: repo=https://github.com/openstack/{{ item }} dest=/home/vagrant/repositories/{{ item }}
with_items:
- api-site
- compute-api
- docs-specs
- ha-guide
- identity-api
- image-api
- netconn-api
- object-api
- openstack-doc-tools
- openstack-manuals
- operations-guide
- security-doc
- training-guides
- volume-api
sudo: False
- command: /usr/local/bin/fetch.sh
sudo: False
handlers:
- name: restart nginx
service: name=nginx state=restarted

View File

@ -22,7 +22,6 @@ commands =
bashate autogenerate_config_docs/autohelp-wrapper \
autogenerate_config_docs/test/genconfs.sh \
bin/doc-tools-check-languages \
build_environment/files/fetch.sh build_environment/bin/package.sh \
cleanup/remove_trailing_whitespaces.sh \
os_doc_tools/scripts/markdown-docbook.sh