-
Notifications
You must be signed in to change notification settings - Fork 17
Home
The vagrant setup installs an entire sw360 server inside one virtual machine. It can be used for different virtual machine environments, currently, there is support for virtualbox and AWS EC2 instances. Basically required:
- Shell environment (bash...) and involved tools, such as wget for downloading software
- Hypervisor, most likely VirtualBox
- Vagrant including plugin vagrant-aws, and if required, proxy
The basic approach for running the setup is provided by the readme file of the project. Here you will find two main things:
- Technical description of the sw360vagrant setup
- What to do after the sw360vagrant setup has been finished.
What to do after the sw360vagrant setup has finished, is described further below.
If you are considering to use the Mac platform, you should really consider installing Homebrew https://brew.sh/. For the further the following packages need to be installed:
brew cask install virtualbox
brew cask install vagrant
This is to run the sw360vagrant
in general. But, for machos there are three issues:
- there is no wget util
- there is only a old version of the bash shell (3.2)
- the linux tool
realpath
isnot available.
Therefore the following tools need to be installed:
brew install wget
brew install bash
brew install coreutils
Then, as with other Ones (such as Ubuntu), you will need:
vagrant plugin install vagrant-aws
vagrant plugin install vagrant-disksize
So, the vagrant setup has deployed sw360, but unfortunately, there is some major issue: With Liferay, certain configuration need to be applied manually in the UI. If you would know how to import *.lar files and apply some setting from the command line (without implementing an approach based on HTML testing frameworks, like selenium), please let us know.
Until then, some tasks need to be done manually, after everything has been built up:
- import *.lar files
- set password policies not to change after first login (it is annoying when developing)
- set the default area to be SW360 when users login to liferay
- apply some more settings, like users cannot create accounts on their own
After successful installation, the screen should look like this. If there is weird html output without images and plain text, then likely some port settings did not work and the pages generated have wrong URLs inside.
Sign in at the icon at the upper left corner. If you did not change the values in configuration.rb
the default login is [email protected]
and sw360fossy
.
Go into the control panel area which can be unfold by clicking in the upper left corner. In this area, go for Users > Password Policies and disable change Required
if you wish to do so. Click on Save to save the selection.
Then, in Configuration
> Instance Settings
> Users
> Default User Associations
to enter SW360 and apply it also to existing users. Click on Save to save the selection.
Then, in Configuration
> Instance Settings
> User Authentication
> General
to disable all kind of auto login to make sure only authenticated users can log in.
Depending on your preferences make appropriate selections according to the screenshot. It is not advisable to allow users to self register in order to access the SW360 data.
Then, in the SW360
area > Publishing
> Import
klick on the plus sign in order to import the *.lar file for public pages.
As for import settings, follow the selection as shown on the screenshot. It is very important that for the PublicPages.lar
file the selection Public Pages
is made.
Importing permission makes sure that pages are visible according to users rights. For public pages, it is irrelevant at the moment.
Overwriting and the write as current user needs to be selected.
After successful importing the following view should appear.
The same steps shall be repeated for the PrivatePages.lar
file.
Make sure that Private Pages
is selected. Follow the other selections made as shown on the screenshots.
Importing permissions ...
Mirror with overwriting, use the current author ...
Then the successful result should be shown like this:
If you click then the liferay logo at the upper left corner where the SW360 is, you will return to the application and the following screen should appear. Click Start
to open the private pages. You are still logged in, so the setup account is used to view the pages.
Important The setup account does not belong to a group. Thus, not all view are functional because they require a group membership to work correctly.
Assuming you are still logged in, the main view of SW360 looks as follows:
Click the SW360 Admin
menu which is at the right and selection the User
item.
At the bottom of that view, select a User file to import for testing. Skip it if you will create users differently.
You can find a user file to import in the sw360vagrant
project in the folder shared
.
After the user have been imported successfully, they should appear in the table view.
After the user have been imported successfully, they should appear in the table view.
One example user is [email protected]
with the password 12345
. Note that in the import file with the example accounts, the passwort is provided with a hash. If you would like to generate new (salted) hashes, you can change your password and export the user list using the same portlet where you have imported the users. This functionality can be also used to migrate accounts between users.
After the successful login, SW360 will look as follows.
After the successful login, SW360 will look as in the following screenshot.
For example, click on Projects
to see that no projects have been created so far ...