Skip to content

Commit 681e8ba

Browse files
Sukhesh Halemaneshaleman
Sukhesh Halemane
authored andcommitted
Move vagrant files; fix readme
Signed-off-by: Sukhesh Halemane <[email protected]>
1 parent a905609 commit 681e8ba

File tree

14 files changed

+32
-364
lines changed

14 files changed

+32
-364
lines changed

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
# find all verifiable packages.
55
# XXX: explore a better way that doesn't need multiple 'find'
6-
PKGS := `find . -mindepth 1 -maxdepth 1 -type d -name '*' | grep -vE '/\..*$\|Godeps|examples|docs|scripts|mgmtfn|bin|contrib|demo'`
7-
PKGS += `find . -mindepth 2 -maxdepth 2 -type d -name '*'| grep -vE '/\..*$\|Godeps|examples|docs|scripts|bin|contrib|demo'`
6+
PKGS := `find . -mindepth 1 -maxdepth 1 -type d -name '*' | grep -vE '/\..*$\|Godeps|examples|docs|scripts|mgmtfn|bin|demo'`
7+
PKGS += `find . -mindepth 2 -maxdepth 2 -type d -name '*'| grep -vE '/\..*$\|Godeps|examples|docs|scripts|bin|demo'`
88
TO_BUILD := ./netplugin/ ./netmaster/ ./netctl/netctl/ ./mgmtfn/k8splugin/contivk8s/
99
HOST_GOBIN := `if [ -n "$$(go env GOBIN)" ]; then go env GOBIN; else dirname $$(which go); fi`
1010
HOST_GOROOT := `go env GOROOT`
@@ -40,7 +40,7 @@ run-build: deps checks clean
4040
cd ${GOPATH}/src/github.com/contiv/netplugin && version/generate_version ${USE_RELEASE} && \
4141
cd $(GOPATH)/src/github.com/contiv/netplugin && \
4242
godep go install -v $(TO_BUILD) && \
43-
sudo cp contrib/completion/bash/netctl /etc/bash_completion.d/netctl
43+
sudo cp scripts/contrib/completion/bash/netctl /etc/bash_completion.d/netctl
4444

4545
build:
4646
make start
@@ -139,7 +139,7 @@ only-tar:
139139

140140
tar: clean-tar build
141141
@cat ${GOPATH}/src/github.com/contiv/netplugin/version/version_gen.go | grep versionStr | cut -f 4 -d " " | tr -d \" > $(VERSION_FILE)
142-
@tar -jcf $(TAR_FILE) -C $(GOPATH)/src/github.com/contiv/netplugin/bin netplugin netmaster netctl contivk8s -C $(GOPATH)/src/github.com/contiv/netplugin contrib/completion/bash/netctl
142+
@tar -jcf $(TAR_FILE) -C $(GOPATH)/src/github.com/contiv/netplugin/bin netplugin netmaster netctl contivk8s -C $(GOPATH)/src/github.com/contiv/netplugin/scripts contrib/completion/bash/netctl
143143

144144
clean-tar:
145145
@rm -f $(TAR_LOC)/*.$(TAR_EXT)

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ $ vagrant ssh netplugin-node1
3535
#### Step 2: Create a network
3636

3737
```
38-
$ netctl net create contiv-net --subnet=20.1.1.0/24 --gateway=20.1.1.254 --pkt-tag=1001
38+
$ netctl net create contiv-net --subnet=20.1.1.0/24
3939
```
4040

4141
#### Step 3: Run your containers and enjoy the networking!

demo/k8s/copy_demo.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22

33
# run ansible
4-
ansible-playbook -i .contiv_k8s_inventory ../../../../../contrib/ansible/cluster.yml --tags "contiv_demo" -e "networking=contiv"
4+
ansible-playbook -i .contiv_k8s_inventory ../../../contrib/ansible/cluster.yml --tags "contiv_demo" -e "networking=contiv"

demo/k8s/restart_cluster.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
top_dir=$(git rev-parse --show-toplevel | sed 's|/[^/]*$||')
44
# run ansible
5-
ansible-playbook -i .contiv_k8s_inventory ../../../../../contrib/ansible/cluster.yml --tags "contiv_restart" -e "networking=contiv contiv_bin_path=$top_dir/contiv_bin"
5+
ansible-playbook -i .contiv_k8s_inventory ../../../contrib/ansible/cluster.yml --tags "contiv_restart" -e "networking=contiv contiv_bin_path=$top_dir/contiv_bin"

demo/k8s/setup_cluster.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function GetKubernetes {
1111
rm -rf $top_dir/k8s-$k8sVer/kubernetes
1212
rm -rf $top_dir/k8s-$k8sVer/bin
1313
else
14-
cd $top_dir/k8s-$k8sVer
14+
cd $top_dir/k8s-$k8sVer
1515
wget https://github.com/kubernetes/kubernetes/releases/download/$k8sVer/kubernetes.tar.gz
1616
fi
1717

@@ -76,4 +76,4 @@ vagrant up
7676
./vagrant_cluster.py
7777

7878
# run ansible
79-
ansible-playbook -i .contiv_k8s_inventory ../../../../../contrib/ansible/cluster.yml --skip-tags "contiv_restart,ovs_install" -e "networking=contiv localBuildOutput=$top_dir/k8s-$k8sVer/kubernetes/server/bin contiv_bin_path=$top_dir/contiv_bin"
79+
ansible-playbook -i .contiv_k8s_inventory ../../../contrib/ansible/cluster.yml --skip-tags "contiv_restart,ovs_install" -e "networking=contiv localBuildOutput=$top_dir/k8s-$k8sVer/kubernetes/server/bin contiv_bin_path=$top_dir/contiv_bin"

demo/mesos-docker/Vagrantfile

+21
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,26 @@ require 'fileutils'
66
# netplugin_synced_gopath="/opt/golang"
77
gopath_folder="/opt/gopath"
88

9+
# Get env setting for http proxies
10+
host_env = { }
11+
host_env["no_proxy"] = "192.168.2.10,192.168.2.11,127.0.0.1,localhost,netmaster"
12+
if ENV['CONTIV_ENV'] then
13+
ENV['CONTIV_ENV'].split(" ").each do |env|
14+
e = env.split("=")
15+
host_env[e[0]]=e[1]
16+
end
17+
end
18+
19+
if ENV["http_proxy"]
20+
host_env["HTTP_PROXY"] = host_env["http_proxy"] = ENV["http_proxy"]
21+
host_env["HTTPS_PROXY"] = host_env["https_proxy"] = ENV["https_proxy"]
22+
end
23+
24+
ansible_extra_vars = {
25+
"env" => host_env,
26+
"validate_certs" => "no",
27+
}
28+
929
ANSIBLE_GROUPS = {
1030
"master" => ["node1"],
1131
"nodes" => ["node2"],
@@ -156,6 +176,7 @@ SCRIPT
156176
ansible.playbook = "playbook.yml"
157177
ansible.groups = ANSIBLE_GROUPS
158178
ansible.limit = "all"
179+
ansible.extra_vars = ansible_extra_vars
159180
end
160181
end
161182
# forward netmaster port

demo/mesos-docker/playbook.yml

+2-10
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,8 @@
33
remote_user: vagrant
44
become: yes
55
become_method: sudo
6+
environment: '{{ env }}'
67
tasks:
7-
# - name: upgrade system (redhat)
8-
# yum:
9-
# update_cache: true
10-
# name: '*'
11-
# state: latest
128
- name: install mesosphere yum repo
139
yum: name=http://repos.mesosphere.com/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpm state=present
1410
- name: install zookeeper yum repo
@@ -36,12 +32,8 @@
3632
remote_user: vagrant
3733
become: yes
3834
become_method: sudo
35+
environment: '{{ env }}'
3936
tasks:
40-
# - name: upgrade system (redhat)
41-
# yum:
42-
# update_cache: true
43-
# name: '*'
44-
# state: latest
4537
- name: install mesosphere yum repo
4638
yum: name=http://repos.mesosphere.com/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpm state=present
4739
- name: install mesos packages

mgmtfn/mesos-docker/README.md

-85
This file was deleted.

mgmtfn/mesos-docker/Vagrantfile

-169
This file was deleted.

0 commit comments

Comments
 (0)