How to install Mission Control from a ZIP installer (sample walk-thru)

Summary

This walk-thru install guide is provided as a reference for JFrog Mission Control's Linux Zip installation. For more details, please visit https://www.jfrog.com/confluence/display/MC/Installing+Mission+Control
 

Affected Versions

3.1, 3.2, 3.3
 

Details

Note: The commands used below are based on Linux RedHat 7 OS and maybe slightly different for your choice of OS.
 

I. Install Java

$ sudo yum install java-1.8.0-openjdk

 

II. Install and Conigure MongoDB

Download and run MongoDB

Downloaded MongoDB (https://www.mongodb.com/download-center/community?jmp=docs) and copy the file mongodb-linux-x86_64-rhel70-3.6.8.tgz to the host

$ tar -zxvf mongodb-linux-x86_64-rhel70-3.6.8.tgz

$ cd mongodb-linux-x86_64-rhel70-3.6.8/bin

$ export PATH=/home/sowjanyak/mongodb-linux-x86_64-rhel70-3.6.8/bin:$PATH

NOTE: source the PATH in bash script

$ mkdir data/db

$ ./mongod –dbpath /home/sowjanyak/mongodb-linux-x86_64-rhel70-3.6.8/data/db
 

Add users in MongoDB instance

https://www.jfrog.com/confluence/display/MC/Linux+ZIP+File+Installation

Note: you can perform the following step only after setting up the Admin user and password in the database. Please have them handy before you proceed.

For example:

$mongo

use admin

db.addUser('admin', 'password');

db.auth('admin','password');
 

$ mongo

MongoDB shell version v3.6.8

connecting to: mongodb://127.0.0.1:27017

MongoDB server version: 3.6.8

Server has startup warnings:

[initandlisten]

> use mission_platform

switched to db mission_platform

> db.createUser({user: "mission_platform", pwd: "password", roles: ["readWrite"]});

Successfully added user: { "user" : "mission_platform", "roles" : [ "readWrite" ] }

> use insight_team

switched to db insight_team

> db.createUser({user: "jfrog_insight", pwd: "password", roles: ["readWrite"]})

Successfully added user: { "user" : "jfrog_insight", "roles" : [ "readWrite" ] }

> use insight_scheduler

switched to db insight_scheduler

> db.createUser({user: "jfrog_insight", pwd: "password", roles: ["readWrite"]})

Successfully added user: { "user" : "jfrog_insight", "roles" : [ "readWrite" ] }

> use insight_executor

switched to db insight_executor

> db.createUser({user: "jfrog_insight", pwd: "password", roles: ["readWrite"]})

Successfully added user: { "user" : "jfrog_insight", "roles" : [ "readWrite" ] }

> exit

Bye

 

Manually Seeding MongoDB running on external hosts

https://www.jfrog.com/confluence/display/MC/Using+External+Databases#UsingExternalDatabases-ManuallySeedingMongoDB

Note: You have to change the bind address in /etc/mongodb.conf for mission-control host to connect to external MongoDB host. To bind to all IPv4 and IPv6 addresses, enter ::,0.0.0.0 or alternatively, use the net.bindIpAll setting.

  • Copy the files ~/jfmc-3.2.0-linux-x86_64/scripts/createMongoUsers.sh and ~/jfmc-3.2.0-linux-x86_64/scripts/createMongoUsers.js to the system where MongoDB is running.
  • Make the shell file executable (chmod +x createMongoUsers.sh)
  • Execute the file ./createMongoUsers.sh and follow the prompts on screen like below.

$ ./createMongoUsers.sh

—————————————————–

| MongoDB Manual Setup                     |

—————————————————–

This script will attempt to seed MongoDB with the databases and users needed by JFrog Mission Control

Please enter the same details as you entered during installation. If the details are incorrect, you may need to rerun the installation

Please enter the MongoDB port [27017]:

Waiting for MongoDB to get ready using the commands: "mongo –port 27017 –version" & "ss -lntu | grep -wq 27017"

MongoDB is ready. Executing commands

Is this a fresh installation with no users? (If you choose 'y', the installer will create an admin user) [Y/n]: Y

Please enter the MongoDB admin user ID [admin] :

Please enter the MongoDB admin user password [password] :

MongoDB setup is now complete

 

III. Install Elasticsearch

Note: Follow same steps for externalizing elasticsearch

$ curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.2.tar.gz

$ sudo sysctl -w vm.max_map_count=262144

$ tar xvf elasticsearch-6.4.2.tar.gz

$ cd /elasticsearch-6.4.2/bin

$ ./elasticsearch start

 

IV. Install Mission Control

$ curl -L "https://jfrog.bintray.com/jfrog-mission-control/jfmc-3.2.0-linux-x86_64.zip" -o jfmc-3.2.0-linux-x86_64.zip

$ tar -zxvf jfmc-3.2.0-linux-x86_64.zip

NOTE: Edit the jfmc/scripts/setEnvDefaults.sh environment file and set relevant environment variables for your ElasticSearch and MongoDB installations.

For example:

export MONGODB_PORT=27017

export MONGO_URL="host:$MONGODB_PORT"

export MONGODB_ADMIN_USERNAME="admin"

export MONGODB_ADMIN_PASSWORD="password"

export ELASTIC_SEARCH_PORT=9200

export ELASTIC_SEARCH_USERNAME="elastic"

export ELASTIC_SEARCH_PASSWORD="changeme"

export ELASTIC_SEARCH_URL="http://host:$ELASTIC_SEARCH_PORT"

 

$ sudo yum install unzip

$ unzip jfmc-3.2.0-linux-x86_64.zip

$ cd jfmc-3.2.0-linux-x86_64/bin

$ ./jfmc.sh start

INFO: Found java executable in /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el7_5.x86_64/jre/bin/java (JFMC_JAVA_HOME : /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el7_5.x86_64/jre)

Generating internal certificates

Checking mongodb …

jfmc-insight-scheduler is already running

jfmc-insight-executor is already running

mission-control is already running

jfmc-insight-server is already running

Log location : /home/user/jfmc-3.2.0-linux-x86_64/logs

$ ./jfmc.sh status

checking jfmc-insight-scheduler … [ Running : 18153 ]

checking jfmc-insight-executor … [ Running : 18185 ]

checking mission-control … [ Running : 18218 ]

checking jfmc-insight-server … [ Running : 18245 ]

Log location : /home/user/jfmc-3.2.0-linux-x86_64/logs