Name: contrail-dev-env
Owner: Juniper Networks
Description: null
Created: 2018-01-23 16:53:23.0
Updated: 2018-03-30 03:47:26.0
Pushed: 2018-03-30 11:36:28.0
Homepage: null
Size: 161
Language: Shell
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This repository is actively maintained via Gerrit so please let us know about any problems you find. You can ask for help on Slack but if no one replies right away, go ahead and open a bug on Launchpad and tag the bug with the tag “dev-env” and it will get looked at soon. You can also post to the new Google Group if you're having trouble but don't know if the problem is a bug or a mistake on your part.
mac: https://docs.docker.com/docker-for-mac/install/#download-docker-for-mac
For CentOS/RHEL/Fedora linux host:
install docker
For Ubuntu linux host:
install docker.io
NOTE (only if you hit any issues): Make sure that your docker engine supports images bigger than 10GB. For instructions, see here: https://stackoverflow.com/questions/37100065/resize-disk-usage-of-a-docker-container Make sure that there is TCP connectivity allowed between the containers in the default docker bridge network, (for example disable firewall).
clone https://github.com/Juniper/contrail-dev-env
ontrail-dev-env
./startup.sh
rail-developer-sandbox [For running scons, unit-tests etc]
rail-dev-env-rpm-repo [Repo server for contrail RPMs after they are build]
rail-dev-env-registry [Registry for contrail containers after they are built]
er attach contrail-developer-sandbox
Required first steps in the container:
root/contrail-dev-env
sync # get latest code using repo tool
fetch_packages # pull third_party dependencies
setup # set up docker container
dep # install dependencies
Now you can run any commands using the source code sandbox, e.g.
root/contrail
s # ( or "scons test" etc)
Or use any of additional make
targets provided by contrail-dev-env/Makefile
:
make setup
- initial configuration of image (required to run once)make sync
- sync code in contrail
directory using repo
toolmake fetch_packages
- pull third_party dependencies (after code checkout)make dep
- installs all build dependenciesmake dep-<pkg_name>
- installs build dependencies for make list
- lists all available rpm targetsmake rpm
- builds all RPMsmake rpm-<pkg_name>
- builds single RPM for make list-containers
- lists all container targetsmake containers
- builds all containers, requires RPM packages in /root/contrail/RPMSmake container-<container_name>
- builds single container as a target, with all docker dependenciesmake clean{-containers,-repo,-rpm}
- artifacts cleanupSee https://github.com/Juniper/contrail-ansible-deployer/wiki/Contrail-with-Kolla-Ocata .
Set CONTAINER_REGISTRY
to registry:5000
to use containers built in step 5.
Note: only RedHat 7 and CentOS 7 are supported at this time!
vm-dev-env/init.sh
(you might be asked for your password as some steps require the use of sudo).
a. You can also run vm-dev-env/init.sh -n
if you don't want to clone work directory on a VM. Then you have to mount sandbox to directory named contrail
next to contrail-dev-env
.make fetch_packages
to pull dependencies to contrail/third_party
sudo ./startup.sh -b
to start required containers.