Configuration of CITSmart Environment using Linux
It is possible to configure CITSmart with Linus OS. This document present a step-by-step to perform the configuration, starting with the installation of Ubuntu and all required applications and proceeding to the integration process.
Before Getting Started
To start the procedure, it is necessary to download the files from this Google Drive folder: https://drive.google.com/drive/folders/1k6f6NtvoAiTwDzQ6trNYHHWo3PSBh0zDUse your Office 365 CITSmart credentials to access the files. Throughout the procedure, it will also be necessary to access GIT. If you do not have access, request it to your manager.
Procedure
Installing OS Ubuntu
- Access the website https://ubuntu.com/#download to download Ubuntu. Click the first button to download the Desktop version. Always use the most recent version.
- After downloading the .iso file, you need to download Rufus https://rufus.ie/pt_BR/ too configure a bootable usb flashdrive.
- Besides Rufus and the .iso file, you will also need a flashdrive with at least 4gb of storage space.
To configure the drive, follow these steps:
- Run Rufus.
- Insert the drive on the machine.
- Rufus will update to show the device on the field Device.
- Select the correct drive.
!!! note "Note"
In order to avoid picking an incorrect device, make sure you have inserted only one device on your machine.- After selecting the device, pick the booting options. The options will be Not Bootable and FreeDOS. Since you are creating a bootable device, pick FreeDOS.
- Leave the options for Partition Scheme (MBR) and Target system (BIOS (or UEFI-CSM)) unchanged.
- Click the button SELECT beside Boot Selection, look for the .iso file and click Open.
- The field VOLUME LABEL will be updated to show the selected ISO.
- The other parameters should be left unchanged.
- Click START to initiate the process.
- During the process, a message may show up warning that Rufus requires aditional files to conclude. Select Yes to proceed.
- During the process, you will be alerted that Rufus detected that the ISO is an image ISOHybrid. Keep the selected ISO image and click OK to proceed.
- Rufus will also warn you that all the data in the device are about to be destroyed. Verify if you selected the correct device before clicking OK.
- Wait for the conclusion of the process, which may take a few minutes depending on your machine. After the conclusion, click CLOSE to close Rufus.
- Insert the drive with the ISO in your computer and restart the machine. Most computers will identify the bootable drive automatically and show you a welcome message, with options of language selection, install Ubuntu or try Ubuntu Desktop.
!!! note "Nota"
If the computer does not automatically boot from the flashdrive, try holding f12 or Delete right when the computer is starting. Most machines will allow you to select the usb drive from a specific initialization menu. If this does not happen, verify the boot options and select the USB drive. If you are not certain, look for a brief message right when the computer is starting, which will show you the correct key to press to access the boot menu.
- Right after selecting your language, you will be asked to select the keyboard layout. If the installer does not detect the layout automatically, select Detect keyboard layout to run a brief configuration procedure.
- After selecting Continue, you will be asked which aplications you wish to install. Select Normal Installation.
- Below the type of installation, there are two selection boxes; one to enable updates during instalation and another to enable third party software..
- Enable both options Download updates and Install third-party software.
- For the next step, internet connection is necessary. If you are not connected, you will be asked to select a wireless network, if available. We advise you to connect during installation to ensure your machine is updated.
- The other options are Localization and Login details.
- After everything is installed and configured, a small window will show asking you to restart your machine. Click Restart Now and remove the flashdrive when asked.
!!! note "Tip"
In case you need it, it is possible to find a list of keyboard shortcuts for Ubuntu here: https://pt.wikibooks.org/wiki/Manual_do_Ubuntu/Teclas_de_atalho Installing Java
- Access the terminal pressing Ctrl+Alt+T and type in the following sequence:
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk
- Locate the .bashrc file at the folder Home, after pressing Ctrl+H, and add the following lines at the end for the environment variables JAVA_HOME and PATH:
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
- Execute the following commands on the terminal:
source ~/.bashrc
echo $JAVA_HOME
echo $PATH
- A screen should show the results of JAVA_HOME and PATH directories.
- Access the terminal and type in the following lines to confirm the installation:
java -version
javac -version
!!! note "Tip"
You can erase the terminal screen by pressing Ctrl+L Authenticating the access on Artifactory
- Accesse this link to authenticate your access to the network (Active Directory):
- Insert your data, and after the authentication, go to the upper right corner of the screen and click your username.
- Type in the network password and click "Unlock".
- Copy the part containing username and password and replace them in settings.xml exactly on the same positions informed previously.
!!! note "Note"
The file settings.xml is located inside the folder config, in the Maven folder.Creating a clone of CITSmart-ITESM repository.
- Access the link bellow to authenticate your access information in SCMManager:
- On the field Search type:
citsmart-itsm-enterprise
- Copy the link on the field Checkout at the bottom of the screen to the Git Clone.
- Open the folder where you wish to clone the CITSmart repository and execute the terminal.
- Type in git clone + the copied link in the Checkout field and press Enter. You will be asked for the network password. This process might take a few minutes.
Creating the server, databased and Login Group Roles on PGADMIN
- It may be necessary to create a new account if you do not have access.
- After the access, right click on Servers/Create/Server
- On the tab General field Name, type in dbcitsmart.
- On the tab Connection type in:
postgres5432postgrespostgrespost
- On the new server, right click the left menu and create a Database named dbcitsmart
- In Login/Group Roles, right click the left menu and select Create/Login/Group Roles
- On the tab General, field Name, type in root
- Repeat the process and create another Login/Group Roles named rtsadmin
Installing Docker
- Access the terminal and type in:
sudo apt install docker-compose
- After the installation, access the folder with the SQL, Postgres and Oracle Databases and execute the Terminal typing in:
sudo docker ps
sudo docker exec -it postgres bash
su postgres
cd /home
ls
psql -l
- Still on the terminal, type in:
pg_restore -d dbcitsmart dbcitsmart.sql
- After this, return to PgAdmin, right click it and Refresh, access dbcitsmart/Schemas/Tables and check the tables migrated with Docker.
Installing Eclipse
- Access the following link to download Eclipse IDE:
https://www.eclipse.org/downloads/packages/release/2020-06/r/eclipse-ide-enterprise-java-developers
- In the Download Links option, choose the version for Linux.
- Extract the downloaded file to the Development folder.
- In the folder where Eclipse was extracted, open the eclipse.ini file and edit the options as below:

- Run the Eclipse file and select a directory to be your workspace. You can check the option “Use this as the default and do not ask again” so that the selection of the workspace directory is not requested again.
- Select in File the option Import:

- In the Maven option, select Existing Maven Projects.
- Enter the directory path where the Citsmart-itsm repository is:

- The Project will appear as below:

- On the eclipse home screen, open the window Window/Preferences and fill in the options of the next screens as below:







- Find the Validation option, searching in the search bar and then enable the Suspend all validators option, as below:

- On the eclipse home screen, right-click on top of the Project, choose Run As/Run Configurations and fill in the options of the next screens as below:


- The next step will be to set a new Servers as below:

- Click on the link in blue “No servers are available. Click this link to create a new server...”
- Choose the option as below:


!!! note "Note"
Click on the progress bar and drag to the side of the Servers tab. - In the Markers tab, right-click on Description with the red icon and choose Remove:
- On the New Server option, select WildFly 12:

- In the Configuration file option, select the xml file standalone-postgres-full.xml, downloaded to OneDrive:
- On the eclipse home screen, open the window Window/Preferences, find the Maven option, then select the User Settings option and fill in as below:

- After Wildfly is installed on the Servers, it will appear in Eclipse as below:

- Double click on top of WildFly 12 and fill in as below::




- In the Program arguments option, fill in as below:
-mp "/home/run2biz/Documents/Desenvolvimento/WILDFLY-12.0.0/modules" org.jboss.as.standalone -b localhost --server-config=standalone-postgres-full.xml -Djboss.server.base.dir=/home/run2biz/Documents/Desenvolvimento/WILDFLY-12.0.0/standalone
- In the VM arguments option, fill in as below:
"-Dprogram.name=JBossTools: WildFly 12" -server -Xms128m -Xmx2048m -Dorg.jboss.resolver.warning=true -Djava.net.preferIPv4Stack=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true "-Dorg.jboss.boot.log.file=/home/run2biz/Documents/Desenvolvimento/WILDFLY-12.0.0/standalone/log/boot.log" "-Dlogging.configuration=file:/home/run2biz/Documents/Desenvolvimento/WILDFLY-12.0.0/standalone/configuration/logging.properties" "-Djboss.home.dir=/home/run2biz/Documents/Desenvolvimento/WILDFLY-12.0.0" -Djboss.bind.address.management=localhost -XX:-UseGCOverheadLimit
- Check the Directory information according to your Directory.
- Still in WildFly 12 settings, fill in the Time Limit, as below:

- Soon after, click on Save.
- Right-click on top of WildFly, choose the Add and Remove option, select Citsmart9 and add:

- Check the clean.sh file, downloaded to OneDrive:

!!! note "Note"
Directory information highlighted in bold should be replaced according to your Directory: rm -rf /home/run2biz/Documents/Desenvolvimento/workspace/citsmart-itsm-enterprise/target/*
rm -rf /home/run2biz/Documents/Desenvolvimento/WILDFLY-12.0.0/standalone/deployments/*
rm -rf /home/run2biz/Documents/Desenvolvimento/WILDFLY-12.0.0/standalone/data/
rm -rf /home/run2biz/Documents/Desenvolvimento/WILDFLY-12.0.0/standalone/log/
rm -rf /home/run2biz/Documents/Desenvolvimento/WILDFLY-12.0.0/standalone/tmp/
- Follow the next steps so that the Project runs correctly.
- Run clean.sh
- Remove the Project in WildFly by right-clicking and choosing Remove.
- Go to the Project, right-click and choose Refresh.

- Still in the Project, right-click and choose Run as/Run Configuration/Run.

- Go to the Project, right-click and choose Refresh.
- Right-click on top of WildFly and choose the Add and Remove option, then select Citsmart9 and add:


- With the Project added to Wildfly, right-click on top of WildFly and choose Clean.
- The screen below will appear, check the Remember my decision optin and click on the No button:


- The Citsmart9 Project will appear in WildFly.
!!! note "Note"
Even if the Project does not run, after all the steps above, right-click on top of the Project, Maven / Update Project and repeat the step-by-step again.
- Access the link below to Citsmart:
- Click on Advance/Proceed
- Okay, now the environment is set!