Skip to content

Added new Vagrantfile for development deployment and installation instructions#589

Merged
tiewei merged 7 commits intocontiv:masterfrom
brecode:master
Feb 14, 2018
Merged

Added new Vagrantfile for development deployment and installation instructions#589
tiewei merged 7 commits intocontiv:masterfrom
brecode:master

Conversation

@brecode
Copy link
Copy Markdown
Member

@brecode brecode commented Feb 14, 2018

This PR provides support for two different K8s cluster deployments. The testing and the development deployment.

- Sharing of the contiv/vpp github repo on the host and the VM allowing the developer to build a development contiv/vpp-vswitch image with changes directly from the host. Support comes when deploying with Vagrantfile-dev
- Vagrantfile-prod is a copy of the original Vagrantfile that was used before, for testing. The cluster does not have shared folders between the host and the VM and does not provide with the option to build development images.
- Different deployements are now supported through flags on the vagrant-up.sh script (-d || --dev-env for development environment, -t || --test-env for testing environmnet)
- Two scripts added under vagrant/config folder to build, save and load a new contivvpp/vswitch image that reflects changes of the code, across the cluster

…structions

- Vagrantfile-dev creates a shared environment between contiv/vpp github repo on the host and the VM allowing the developer to build a development contiv/vpp-vswitch image
- Vagrantfile-prod is a copy of the original Vagrantfile that was used before for testing. The cluster does not contain shared folders and does not provide with the ability to build development images.
- vagrant-up.sh script modified to support different deployement through flags (-d || --dev-env for development environment, -t || --test-env for testing environmnet)
- Two scripts added under vagrant/config folder to build, save and load a new contivvpp/vswitch image that reflects changes of the code, across the cluster
@coveralls
Copy link
Copy Markdown

coveralls commented Feb 14, 2018

Coverage Status

Coverage remained the same at 76.414% when pulling beb92ac on brecode:master into a8f11fa on contiv:master.

Copy link
Copy Markdown
Contributor

@tiewei tiewei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve with some little nits

Comment thread vagrant/Vagrantfile-prod Outdated
end
end
end
end No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a newline

Comment thread vagrant/config/load-dev-image.sh Outdated

set -euo pipefail

docker load < /vagrant/config/vswitch.tar No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a newline

Comment thread vagrant/config/save-dev-image.sh Outdated

echo "Building and saving contivvpp/vswitch image..."
cd /home/vagrant/gopath/src/github.com/contiv/vpp/docker/development; ./build.sh
docker save contivvpp/vswitch:latest > /vagrant/config/vswitch.tar No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a newline


if [ -f ../Vagrantfile ] ; then
rm ../Vagrantfile
fi No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a newline

Comment thread vagrant/vagrant-scripts/vagrant-up.sh Outdated
then
cp ../Vagrantfile-prod ../Vagrantfile
vagrant up
fi No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a newline

Comment thread vagrant/vagrant-scripts/vagrant-up.sh Outdated
if [ "${DEV_ENV}" == "true" ]
then
cp ../Vagrantfile-dev ../Vagrantfile
vagrant up
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can set VAGRANT_VAGRANTFILE environment variable to point the vagrant file, instead of cp and rm later
VAGRANT_VAGRANTFILE =foobar vagrant up

- Moved config folder under the folder scripts are running
- Edited README.md to match new file loactions
@tiewei tiewei merged commit d850992 into contiv:master Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants