Skip to content

Instantly share code, notes, and snippets.

@roycyt
Last active April 22, 2020 10:44
Show Gist options
  • Save roycyt/b6ddd241caf734732d1780d5de27a6ec to your computer and use it in GitHub Desktop.
Save roycyt/b6ddd241caf734732d1780d5de27a6ec to your computer and use it in GitHub Desktop.
Deploy SW360 7.0.1-M1 with sw360chores

Install Docker CE

sudo usermod -aG docker $(whoami)

Install docker-compose

sudo curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Install OpenJDK 8 JDK

sudo apt install openjdk-8-jdk

Install Apache Maven 3.6.X

cd ~
curl -O http://ftp.tc.edu.tw/pub/Apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
tar xvf apache-maven-3.6.3-bin.tar.gz
export PATH=$HOME/apache-maven-3.6.3/bin:$PATH

Clone sw360 and sw360chores source code

cd ~/src
git clone https://github.com/eclipse/sw360.git
git clone https://github.com/sw360/sw360chores.git

Intall Apache Thrift 0.11.0

Build and install the Thrift from source code to /usr/local/bin/thrift:

cd ~/src/sw360
./scripts/install-thrift.sh

Build sw360 war files

rm -rf ~/src/sw360chores/_deploy
cd ~/src/sw360
mvn clean
mvn package -P deploy -Dbase.deploy.dir=$HOME/src/sw360chores/_deploy -DskipTests

Change the SW360 server IP address

Modify the SW360_HOST setting in the ~/src/sw360chores/configuration/sw360/sw360.env:

SW360_PROTOCOL=https
SW360_HOST=localhost
SW360_HTTP_PORT=-1
SW360_HTTPS_PORT=8443

Build sw360chores all images and start them

cd ~/src/sw360chores
./sw360chores.pl --build -- up

Configure the Liferay Portal

Login to the Liferay Portal

  1. Go to https://IP_ADDRESS:8443/web/guest
  2. Sign in with account setup@sw360.org, password sw360fossy
  3. You'll get a Not Found message after login. Do not worry that is alright for the moment.
    Not Found
    The requested resource could not be found.
    
    https://192.168.56.102:8443/group/guest/home
    

User association

  1. Open the panel on the left side by clicking the button on the top left.
  2. Go to Control Panel -> Configuration -> Instance settings.
  3. Click on Users (inside section Platform).
  4. Click on Default User Associations on the left side.
  5. Fill the field Sites on the top with SW360 and click on Save.
  6. This way newly created users are automatically assigned to the site SW360 and can access the content on it.

Import SW360 site

  1. Open the panel on the left side by clicking the button on the top left.
  2. Go to SW360 -> Publishing -> Import.
  3. Import the following page archives (in that order) from /home/roy/src/sw360/frontend/configuration...
    1. Public_Pages.lar
    2. Private_Pages.lar
  4. ...by following theses steps:
    1. Click on + on the top right.
    2. Select the appropiate file and click Continue.
    3. Select Public Pages or Private Pages depending on the prefix of the filename.
    4. Enable all following options:
      • Theme Settings
      • Logo
      • Site Page Settings
      • Site Template Settings
    5. Enable Delete Missing Pages only when import Private Pages.
    6. No options need to be checked inside section DELETIONS.
    7. Check Import Permissions inside section PERMISSIONS.
    8. Expand section Update Data and select Mirror with overwriting.
    9. Expand section Authorship of the Content and select Use the Current User as Author.
    10. Click Import.

Configuring the SW360 site

Upload example users

  1. Go into Admin -> User
  2. Upload this file: https://github.com/sw360/sw360chores/blob/master/miscellaneous/test_users_with_passwords_12345.csv

Login as one of the example users

  1. Go to the SW360 site
  2. Login as account user with password 12345
@dineshr93
Copy link

dineshr93 commented Apr 22, 2020

After doing all that the component page says "Components is temporarily unavailable."
& fossology page says "Fossology Administration is temporarily unavailable. "

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment