Skip to content

Commit

Permalink
remove all vagrant stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Lin committed Jul 5, 2018
1 parent 39388fa commit 5653a72
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 160 deletions.
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*.dll
*.so
*.dylib
.vagrant
vendor/*
!vendor/vendor.json

Expand All @@ -17,10 +16,6 @@ vendor/*
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

### Vagrant ###
.vagrant/
*.box

### Vim ###
# swap
.sw[a-p]
Expand All @@ -38,9 +33,7 @@ main
network-controller-server
network-controller-client
coverage.txt
ubuntu-xenial-16.04-cloudimg-console.log
vet.report
tmp/*
*.log

# End of https://www.gitignore.io/api/go,vim,vagrant
24 changes: 0 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,27 +58,3 @@ test: pb client server
sudo -E env PATH=$$PATH TEST_VETH=1 $(TEST_OVS) $(TEST_DOCKER) go test -parallel=1 -v ./...

.PHONY: server client vet test clean

# Vagrant
VAGRANT :=$(shell which vagrant)

ifneq ($(VAGRAMT), "")
VAGRANT_SCP := $(shell vagrant plugin list | grep vagrant-scp)
endif

vagrant:
@if [ "$(VAGRANT)" == "" ] ; then echo "You need to install the vagrant first"; exit 1; fi

vagrant-scp: vagrant
@if [ "$(VAGRANT_SCP)" == "" ]; then vagrant plugin install vagrant-scp ;fi

up: clean-tmp vagrant-scp
vagrant up
mkdir tmp
vagrant scp network_controller:/home/vagrant/.kube/config tmp/admin.conf

clean-tmp:
rm -rf tmp

vagrant-clean: clean-tmp
vagrant destroy -f
45 changes: 0 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,51 +17,6 @@ make client
make test
```

### Development with Vagrant
- Run vagrant
```sh
$ make up
```
- Clean vagrant VM
```sh
$ make vagrant-clean
```

### Development with Vagrant Environment
There're at least two way to use this vagrant to develop the vortex project.

#### Method-one
Since the vagrant alreay install the proto-buf and golang into the ubuntu, you can use
`vagrant ssh` to login into the ubuntu and develop the project in that VM.
It also contains the `kubectl` and `docker` command for your development.

#### Method-two
If you want to develop the vortex in your local host, you can read the following instruction
to setup your `docker` and `kubectl`.

- **Docker**
```sh
$ export DOCKER_HOST="tcp://172.17.9.100:2376"
$ export DOCKER_TLS_VERIFY=`
```
Now, type the `docker images` and you will see the docker images in that ubuntu VM.

- **Kubectl**
After the `make up`, the script will copy the kubenetes config from the VM into the tmp/config.
You can use the following to merge that config with your own config and use the `kubectl config use-context`
to switch the kubernetes cluster for your kubectl.

```sh
$ cp ~/.kube/config ~/.kube/config.bk
$ KUBECONFIG=~/.kube/config:`pwd`/tmp/admin.conf kubectl config view --flatten > tmpconfig
$ cp tmpconfig ~/.kube/config
```
If there're any error in the step(2), please copy the `config.bk` to restor your kubernets config.
Now, you can use `kubectl config get-contexts` to see the `kubernetes-admin@kubernetes` in the list and then
use the **`kubectl config use-context kubernetes-admin@kubernetes`** to manipulate the VM's kubernetes.


## Usage

### Run a Server
Expand Down
81 changes: 0 additions & 81 deletions Vagrantfile

This file was deleted.

3 changes: 0 additions & 3 deletions vagrant-docker.conf

This file was deleted.

0 comments on commit 5653a72

Please sign in to comment.