diff --git a/tools/appliance/README.md b/tools/appliance/README.md index 7a9973ae70d..82b04881090 100644 --- a/tools/appliance/README.md +++ b/tools/appliance/README.md @@ -101,7 +101,7 @@ the systemvmtemplate: cp -r definitions/systemvmtemplate definitions/systemvm64template veewee vbox build 'systemvm64template' -Trobuleshooting +Troubleshooting =============== If you see following line in the screen, then veewee is failing extracting vboxmanage version. @@ -115,3 +115,9 @@ You would be able to check it manually by typing: If you're using Fedora for example, you'll need to install `kernel-devel` package and run `/etc/init.d/vboxdrv setup` to get veewee working. +Testing +======= +The ./test.sh script tries out a few different default ways to invoke build.sh. + +See ../vagrant/systemvm for a test setup that uses vagrant+serverspec to +provide actual integration tests that verify the built systemvm is up to spec. diff --git a/tools/vagrant/systemvm/.gitignore b/tools/vagrant/systemvm/.gitignore index 09abf9359ae..70f6d2ad600 100644 --- a/tools/vagrant/systemvm/.gitignore +++ b/tools/vagrant/systemvm/.gitignore @@ -49,3 +49,4 @@ systemvm.iso iso/* rspec.xml +vendor/ diff --git a/tools/vagrant/systemvm/Gemfile b/tools/vagrant/systemvm/Gemfile index 9589a067b36..32e7896753d 100644 --- a/tools/vagrant/systemvm/Gemfile +++ b/tools/vagrant/systemvm/Gemfile @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + source 'https://rubygems.org' gem 'rake' diff --git a/tools/vagrant/systemvm/README.md b/tools/vagrant/systemvm/README.md index 0b299bcc928..9f2536db78a 100644 --- a/tools/vagrant/systemvm/README.md +++ b/tools/vagrant/systemvm/README.md @@ -1,2 +1,30 @@ -systemvm-vagrant -================ +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. + +=========================================================== + +Allows spinning up the systemvm appliance from ../../appliance inside +vagrant, and then running tests against it with serverspec. + +To use, install vagrant, rvm, ruby, and bundler. Then run ./test.sh. + +To write tests, create files underneath spec/ whose names end in +_spec.rb. These tests are [RSpec](http://rspec.info/) tests that use +[Serverspec](http://serverspec.org/) matchers. Basically, they log +in using SSH and then inspect files and processes. See the list of +[Serverspec matchers](http://serverspec.org/resource_types.html) +for inspiration. diff --git a/tools/vagrant/systemvm/Rakefile b/tools/vagrant/systemvm/Rakefile index b6a9881353a..042a1e7d977 100644 --- a/tools/vagrant/systemvm/Rakefile +++ b/tools/vagrant/systemvm/Rakefile @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + require 'rake' require 'rspec/core/rake_task' diff --git a/tools/vagrant/systemvm/VBoxManage b/tools/vagrant/systemvm/VBoxManage index 67df74ce552..2d98a3609fa 100755 --- a/tools/vagrant/systemvm/VBoxManage +++ b/tools/vagrant/systemvm/VBoxManage @@ -1,4 +1,20 @@ #!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. # In some cases, while booting a virtual machine, an IDE controller # will be created for it. It seems that the VirtualBox GUI likes doing diff --git a/tools/vagrant/systemvm/Vagrantfile b/tools/vagrant/systemvm/Vagrantfile index 6630cb33e18..78c9bb47490 100644 --- a/tools/vagrant/systemvm/Vagrantfile +++ b/tools/vagrant/systemvm/Vagrantfile @@ -1,5 +1,23 @@ #-*- mode: ruby -*- # vi: set ft=ruby : + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + include RbConfig VAGRANTFILE_API_VERSION = '2' diff --git a/tools/vagrant/systemvm/spec/spec_helper.rb b/tools/vagrant/systemvm/spec/spec_helper.rb index 56bb307ac3d..a4839bb5bdf 100644 --- a/tools/vagrant/systemvm/spec/spec_helper.rb +++ b/tools/vagrant/systemvm/spec/spec_helper.rb @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + require 'serverspec' require 'pathname' require 'net/ssh' diff --git a/tools/vagrant/systemvm/spec/test_cloudstack_metadata_spec.rb b/tools/vagrant/systemvm/spec/test_cloudstack_metadata_spec.rb index 72814f2d861..cd239af4ecf 100644 --- a/tools/vagrant/systemvm/spec/test_cloudstack_metadata_spec.rb +++ b/tools/vagrant/systemvm/spec/test_cloudstack_metadata_spec.rb @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + require 'spec_helper' describe file('/etc/cloudstack-release') do