-
Notifications
You must be signed in to change notification settings - Fork 20
Deploy sw360 on Windows (with Vagrant)
If you would like to install the sw360 on Windows on solutions is to use the support project
https://www.github.com/sw360/sw360vagrant
As for Linux and macosx, this project prepares a vagrant box and uses this to install sw360 into a VM derived from the box. The reason for these two stages is that with a prepared box already built, the dependencies are not needed to be downloaded and installed at every deployment. Especially at development, this results in an enormous time savings.
First of all, the scripts of the sw360vagrant will not likely execute. A shell environment needs to be installation. For our case, we have tested this with Cygwin (https://cygwin.com/). So the preparation steps are as follows:
- Download and install cygwin. In case you are in an enterprise network and have much fun with proxies: The cygwin installer can take your IE settings or have your proxy settings handy.
- When installing cygwin, make sure that you selct wget as this tool is used to download the dependencies.
- Then as second step you will need to install a git client to download the sw360vagrant project. Alternatively, you could also download the *.zip file from the github page of the current master.
- Install VirtualBox. Versions such as 4.3.30 or 5.0.18 are used frequently and should be problem free.
- Install vagrant (https://www.vagrantup.com/) for Virtual box and Windows hosts. Although you will run sw360 on an ubuntu system, please do not be confused, because the ubuntu VM will run as guest and the vagrant download selection refers to the host OS.
In case you have a proxy-ied environment, please not that older versions of vagrant do not support the proxy configuration section.
The configuration of the sw360 happens using the file shared/configuration.rb
. The following are the most popular settings for installation:
# This file will be parsed as Ruby __and__ Bash for configuration puroses. This
# means that it has to be syntactically valid for both
...
# Set this to "true" if you want vagrant to install sw360 automatically
SW360_install=true
# Set this to "true" when working with a network behind a proxy
SW360_proxy=true
SW360_proxy_http="http://yourproxy..."
SW360_proxy_https="https://yourproxy..."
SW360_proxy_bypass="localhost,127.0.0.1"
...
SW360_default_password="sw360fossy-pleasechange"
SW360_admin_name="setup"
...
SW360_vm_name="sw360-single-20160408-cleandemo-2222-8443"
SW360_basebox_name="sw360-trusty"
SW360_vagrant_user="siemagrant"
...
SW360_CPUs=2
SW360_RAM=4096
...
SW360_https_port=8443
...
SW360_gitURL="https://github.com/siemens/sw360portal.git"
...
Then, you can go ahead with the download-packages.sh
and generate-box/generate_box.sh
scripting
When executing the generate_box.sh script you may receive the following error:
Unknown configuration section ‘proxy’.
In this case, you will need to install the referring vagrant plugin that adds the missing support for proxy configuration. Enter:
vagrant plugin install vagrant-proxyconf
In case ruby is not happy downloading this gem, because it complains that it cannot fetch the spec from Hashicorp, please check the following page for help: https://github.com/mitchellh/vagrant/issues/5966
When executing the generate box part, there might be an error message, complaining about that vboxsf
could not be installed due to a problem with guest additions. That is likely a too old version of VirtualBox. Versions 4.3.36 or 5.0.18 will be certainly fine.
Finally start up with vagrant up
executed in sw360-single
. Then you will need to go through the standard vagrant installation steps, which can be seen in the the readme of the sw360vagrant project.