Skip to content

Commit

Permalink
Auto-gen file push (#25)
Browse files Browse the repository at this point in the history
* Submit generated file that is updated by protogen

* fix if check for network, outdated file was pulled

* Add dind tool installation
  • Loading branch information
jlmorris3827 authored Jan 16, 2019
1 parent 0b27980 commit aa0d799
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 67 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

all: build
all: build install-dind

linux: build-linux

Expand All @@ -8,3 +8,8 @@ build:

build-linux:
make -C ./openstack-tenant/agent/ linux

install-dind:
./install-dind.sh


9 changes: 9 additions & 0 deletions install-dind.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

if [ ! -e /usr/local/bin/dind-cluster-v1.13.sh ]; then
wget https://github.com/kubernetes-sigs/kubeadm-dind-cluster/releases/download/v0.1.0/dind-cluster-v1.13.sh
mv dind-cluster-v1.13.sh /usr/local/bin/
chmod +x /usr/local/bin/dind-cluster-v1.13.sh
else
echo "dind-cluster-v1.13.sh already installed"
fi
136 changes: 72 additions & 64 deletions openstack-tenant/agent/api/mexosagent.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions openstack-tenant/agent/server/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ func fileExists(name string) bool {
// CreateNginx creates an nginx container with the specified name and optional network
// with the specified ports
func CreateNginx(name string, network string, ports []*api.NginxPort) error {
log.Debugln("create nginx", name, ports)
log.Debugln("create nginx", "name", name, "network", network, "ports", ports)
pwd, err := os.Getwd()
if err != nil {
log.Debugln("can't get cwd", err)
Expand Down Expand Up @@ -427,7 +427,7 @@ func CreateNginx(name string, network string, ports []*api.NginxPort) error {
}

cmdArgs := []string{"run", "-d", "--rm", "--name", name}
if network == "" {
if network != "" {
// when runnning in DIND it cannot use host mode and so must expose the ports
cmdArgs = append(cmdArgs, "--network", network)
for _, p := range ports {
Expand Down

0 comments on commit aa0d799

Please sign in to comment.