Install with Docker
Following you have the docker instructions. Please, visit also dockerhub for updates.
Basic start
Simple run with docker:
docker run -d --name objectscriptquality
-p 9000:9000
-p 9092:9092
litesolutions/objectscriptquality
This installation uses an internal database and is for evaluation purposes.
Advanced start
Docker compose example configuration, with Postgres and volumes in the current directory, to store configuration between restarts.
The following configuration will arise a docker with SonarQube and the latest objectscriptQuality plugin.
version: '3'
services:
sonarqube:
build: .
image: litesolutions/objectscriptquality
depends_on:
postgres:
condition: service_healthy
ports:
- 9000:9000
- 9092:9092
environment:
SONAR_JDBC_USERNAME: sonar
SONAR_JDBC_PASSWORD: sonar
SONAR_JDBC_URL: jdbc:postgresql://postgres:5432/sonar
volumes:
- ./sonarqube:/opt/sonarqube/data
postgres:
image: postgres:latest
environment:
POSTGRES_USER: sonar
POSTGRES_PASSWORD: sonar
POSTGRES_DB: sonar
volumes:
- ./postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
Bundle deployment
With the following deployment example, you will have a complete analyzer bundle that includes SonarQube, Jenkins, sonar-scanner, and cachedb-import. The configuration maps postgres data and volumes in a local path to store configuration between restarts.
Notice that you need to set up your Iris server aside and set the proper configuration parameters in your docker-compose.yml file.
version: '3' services: jenkins: image: litesolutions/jenkins-objectscriptquality ports: - "8080:8080" - "50000:50000" networks: - ci environment: IRIS_HOST: 192.168.226.1 IRIS_PORT: 1972 IRIS_WEBPORT: 52773 IRIS_USER: _SYTEM IRIS_PASSWORD: SYS IRIS_NAMESPACE: USER volumes: - /opt/jenkins-data:/var/jenkins_home sonarqube: image: litesolutions/objectscriptquality depends_on: postgres: condition: service_healthy ports: - 9000:9000 - 9092:9092 networks: - ci environment: SONAR_JDBC_USERNAME: sonar SONAR_JDBC_PASSWORD: sonar SONAR_JDBC_URL: jdbc:postgresql://postgres:5432/sonar volumes: - /home/lite/sonarqube-data:/opt/sonarqube/data postgres: image: postgres:latest environment: POSTGRES_USER: sonar POSTGRES_PASSWORD: sonar POSTGRES_DB: sonar networks: - ci volumes: - /home/lite/postgres-data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] interval: 10s timeout: 5s retries: 5 networks: ci:
Bundle deployment including IRIS
With the following deployment example, you will have a complete analyzer bundle that includes SonarQube, Jenkins, sonar-scanner, and cachedb-import. The configuration maps postgres data and volumes in a local path to store configuration between restarts.
Notice that you are including an Iris server which is for demo purposes. You should use this deployment for a production environment only if you need transform files from XML to CLS and your code is in a source code repository. Otherwise, use it only for validation purposes.
version: '3' services: iris: image: intersystemsdc/iris-community networks: - ci ports: - 9102:1972 - 9103:52773 command: - -a - iris session iris -U %SYS '##class(Security.Users).UnExpireUserPasswords("*")' jenkins: image: litesolutions/jenkins-objectscriptquality ports: - "8080:8080" - "50000:50000" networks: - ci environment: IRIS_HOST: iris IRIS_PORT: 1972 IRIS_WEBPORT: 52773 IRIS_USER: _SYSTEM IRIS_PASSWORD: SYS IRIS_NAMESPACE: USER volumes: - ./sonar/jenkins-data:/var/jenkins_home sonarqube: image: litesolutions/objectscriptquality depends_on: postgres: condition: service_healthy ports: - 9000:9000 - 9092:9092 networks: - ci environment: SONAR_JDBC_USERNAME: sonar SONAR_JDBC_PASSWORD: sonar SONAR_JDBC_URL: jdbc:postgresql://postgres:5432/sonar SONAR_LANG_PATTERNS_PHP: '**/*.php' volumes: - ./sonar/sonarqube-data:/opt/sonarqube/data postgres: image: postgres:latest environment: POSTGRES_USER: sonar POSTGRES_PASSWORD: sonar POSTGRES_DB: sonar networks: - ci volumes: - ./sonar/postgres-data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] interval: 10s timeout: 5s retries: 5 networks: ci:
Services
SonarQube
You can check your SonarQube working on http://localhost:9000.
The default user with Administer System permission is admin, with password admin.
On first access, you will be required to change your password. If you are testing the bundle deployment, type sonar to allow the default Jenkins jobs to run. Later you should use any password you want, changing the password access in the jobs.
Jenkins
You can check your Jenkins working on http://localhost:8080.
On first access you will be asked for a key which can be obtained with the following command:
docker logs objectscriptquality_jenkins_1
objectscriptquality_jenkins_1 is the name of your running docker, and you can get it executing:
docker ps
After introducing the requested key, Jenkins will ask to install plugins. Answer NO to plugin installation.
Now you can address to the jobs list and explore them. We have deployed 2 examples:
Example 1: Airplane
This job downloads the project from Github and all files are in CLS format.
Example 2: Cache-MDX2JSON2
This job downloads the project from Github and all files are in XML format, so there are additional steps to transform files to CLS format.
Please, refer to Setup a new project in Jenkins to learn more about basic Jenkins jobs.
Licensing
To activate this plugin you have to get Server ID. Login to your SonarQube installation. If it is the first time you log in, remember the default user is 'admin' and the default password is 'admin'. For security reasons, ensure to change the default credentials. Go to Administration > System.
Send an email with the following information to info@objectscriptquality.com:
Organization:
Server ID:
Environment: evaluation / production
We will generate a license before 24 hours and will notiy you by email. No more action is required in your side to get the license working.