Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish image to DockerHub #31

Open
rbales79 opened this issue Mar 14, 2019 · 1 comment
Open

Publish image to DockerHub #31

rbales79 opened this issue Mar 14, 2019 · 1 comment

Comments

@rbales79
Copy link

It would be really great if the nsx-t-install image was published to dockerhub so it could be pulled without the wonky tar file image and all the issues associated with that. tags :master :unified :whatever

@rbales79
Copy link
Author

rbales79 commented Mar 26, 2019

Deployment

I have forked the repo, and added the original as upstream, so I fetch upstream, merge upstream to master and push to origin. Then I created a docker hub build job that build the docker image anytime I push changes

I use port 80 for my nginx server, and I create a persistent volume for workspace just to make it easier to t-shoot which versions or what's in some of the files that i'm pulling from github. all you need to do is create the /home/concourse folder, and place your edited pipeline yml file in it, then run the following command to pull the image from docker hub and get it kickstarted.

docker run --name install-nsxt -d -v /var/run/docker.sock:/var/run/docker.sock -v /home/concourse:/home/concourse -v /home/workspace:/home/workspace -e CONCOURSE_URL="http://10.0.102.83:8080" -e EXTERNAL_DNS="10.0.1.2" -e IMAGE_WEBSERVER_PORT=80 -e NSXT_VERSION=2.4.0 -e PIPELINE_BRANCH='nsxt_2.4.0' -e VMWARE_USER='vmwareaccount' -e VMWARE_PASSWORD='vmwareacctpassword' rbales79/install-nsxt:nsxt_2.4.0

For older versions than 2.4 they use the master branch which is default, so no need to specify pipeline_branch.

docker run --name install-nsxt -d -v /var/run/docker.sock:/var/run/docker.sock -v /home/concourse:/home/concourse -v /home/workspace:/home/workspace -e CONCOURSE_URL="http://10.0.102.83:8080" -e EXTERNAL_DNS="10.0.1.2" -e IMAGE_WEBSERVER_PORT=80 -e NSXT_VERSION=2.3.0 -e VMWARE_USER='vmwareaccount' -e VMWARE_PASSWORD='vmwareacctpassword' rbales79/install-nsxt

So I can monitor the initial download of the ova's i watch the file system, the second one can be used to monitor docker containers being deployed

watch -n 1 df
watch -n 1 docker ps

Cleanup - in the event of failures, even using terraform to deploy a jumphost, it got tedious redeploying constantly. It was easier to just cleanup and try again, don't forget to delete any vm's and unregister the extension, if nsx vibs were installed on hosts, you should unprep them before doing any of this. I created the bash script to copy my updated yml files, perform the cleanup, and then i can just run the above again.

docker kill $(docker ps -q)
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
docker system prune --all --force
rm -rf /var/lib/docker
rm -rf /home/concourse/keys
rm -rf /home/concourse/docker-compose.yml
rm -rf /home/concourse/generate-keys.sh
rm -rf /home/concourse/pipeline_config_internal.yml

Because I mounted workspace as well for troubleshooting

rm -rf /home/workspace/concourse-docker
rm -rf /home/workspace/nsx-t-datacenter-ci-pipelines

Because overlayFS hates me

rm -rf /var/lib/docker
systemctl stop docker
systemctl start docker
cp /home/ubuntu/nsx_pipeline_config.yml /home/concourse

Remove vCenter NSX Extension via mob

  • Log in to vSphere web client as an administrator.
  • Select the ESXi host.
  • Click the Manage > Settings tab.
  • Select Advanced System Settings from the menu.
  • Enable the Config.HostAgent.plugins.solo.enableMob option.
  • Login to the MOB.
  • Click the content link, which is the value for the content property in the Properties table.
  • Click the ExtensionManager link, which is the value for extensionManager property in the Properties table.
  • Click the UnregisterExtension link in the Methods table.
  • Enter com.vmware.nsx.management.nsxt in the value text field.
  • Click the Invoke Method link on the right hand side of the page below the Parameters table.
  • The method result says void but the extension will be removed.
  • To make sure the extension is removed, click the FindExtension method in the previous page and invoke it by entering the same value for the extension.
    The result should be void.

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

No branches or pull requests

1 participant