$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew install redis wget n
Alternatively, you can use nvm
and containerized redis server to replace n
and local redis
, respectively.
$ n 0.10.35
$ sudo easy_install pip && pip install --user lxml
Alternative way to install pip
:
$ curl https://bootstrap.pypa.io/get-pip.py | sudo python
$ mkdir sandbox
$ cd sandbox
$ git clone https://github.com/Juniper/contrail-web-core.git
$ git clone https://github.com/Juniper/contrail-webui-third-party.git
$ git clone https://github.com/Juniper/contrail-web-controller.git
$ git clone https://github.com/Juniper/contrail-web-server-manager.git
$ git clone https://github.com/Juniper/contrail-web-storage.git
$ cd contrail-web-core
$ make fetch-pkgs-dev
- Make orchestration modules consume remote API services
- At the begining of the file, create a varible of remote API server IP
var contrail_ip = "10.84.11.2"; // For users who don't have access to the internal servers,
// use "10.1.1.200"
NOTE: For those who will use "10.1.1.200", check also the usage of openVPN.
-
Make below orchestration modules point to the remote server(which pulls and returns real data)
- networkManager
- imageManager
- computerManager
- identityManager
- storageManager
- cnfg
- analytics
An example:
config.networkManager.ip = contrail_ip;
-
Normally you'll point jobServer and redis to your local machine and other IP with your Contrail Installation.
-
For each feature, update the feature pkg path in config/config.global.js
-
By default in config, only webController is given as featurePkg
-
Similarly add config.featurePkg.serverManager and config.featurePkg.webStorage if you need those as well.
Check admin_user
and admin_password
. If they aren't filled, please fill them with valid credentials:
var auth = {};
auth.admin_user = 'admin';
auth.admin_password = 'contrail123';
auth.admin_token = '';
auth.admin_tenant_name = 'admin';
$ make dev-env REPO=webController
$ make dev-env REPO=webController,serverManager,webStorage
$ make test-env REPO=webController,serverManager,webStorage
$ redis-server /usr/local/etc/redis.conf
- start local server instances
Note: each server needs run in its own process
$ node jobServerStart.js
$ node webServerStart.js
- open app at
http://localhost:8080
- Install git review
$ pip install --user git-review
- Create your account in
http://review.opencontrail.org/
- Add your ssh public key
id_rsa.pub
toreview.opencontrail.org
NOTE: if you run into permission issues using pip
to install git-review
, try below alternative:
$ brew install git-review
$ git remote add gerrit ssh://<username>@review.opencontrail.org:29418/Juniper/<repo-name>.git
For developers with no access to internal servers, they need to use openVPN to access another project installation on AWS.
- Open https://52.9.112.220:943/?src=connect in browser and login with your username/password (ask the manager for the credentials)
- After log in, download and install the openVPN client.
- Once installed, provide your username/password to the client and connect to 52.9.112.220
- When connected, you can access the application on 10.1.1.200:8080 with defautl credentials (admin/secret123). For development, point your local servers to this IP address.
Cassandra is also needed. It can be ran using docker: