Skip to content
This repository has been archived by the owner on May 22, 2020. It is now read-only.

Commit

Permalink
changes for some of initial feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
colemickens committed Jun 16, 2016
1 parent f56f5e2 commit 1e8a85f
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 42 deletions.
19 changes: 3 additions & 16 deletions min-turnup/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,12 @@ RUN bash -c "\
apt-get install -y make unzip jq && \
rm -rf /var/lib/apt/lists/*"

ENV TERRAFORM_VERSION 0.7.0-rc1
ENV TERRAFORM_VERSION 0.7.0-rc2
RUN bash -c "\
wget -q -O /tmp/terraform.zip \"https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip\" && \
unzip /tmp/terraform.zip -d /usr/local/bin/ && \
rm /tmp/terraform.zip"

################################################################################################
# TEMP: For now get terraform from source so we get ipv4 forwarding for Azure
################################################################################################
#RUN bash -c "\
# apt-get update && apt-get -y upgrade && \
# apt-get install -y nodejs npm golang-go && \
# rm -rf /var/lib/apt/lists/*"
#ENV GOPATH "/root/gopkgs"
#ENV PATH "$GOPATH/bin:$PATH"
#RUN bash -c "mkdir -p $GOPATH/src/github.com/hashicorp/ && \
# git clone https://github.com/hashicorp/terraform $GOPATH/src/github.com/hashicorp/terraform && \
# cd $GOPATH/src/github.com/hashicorp/terraform; make dev"

################################################################################################
# Azure - Required dependencies
################################################################################################
Expand All @@ -46,8 +33,8 @@ RUN bash -c "\
make; \
cp jsonnet /usr/bin/jsonnet;"

WORKDIR /opt/kube-deploy
WORKDIR /opt/kube-min-turnup

ADD . /opt/kube-deploy/
ADD . /opt/kube-min-turnup/

CMD make
3 changes: 3 additions & 0 deletions min-turnup/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ docker-build:
docker build -t kube-min-turnup .

docker-run: docker-build
docker run -it --net=host kube-min-turnup /bin/bash

docker-dev: docker-build
docker run -it --net=host -v `pwd`:/opt/kube-min-turnup kube-min-turnup /bin/bash

default:
Expand Down
13 changes: 0 additions & 13 deletions min-turnup/README-azure

This file was deleted.

8 changes: 3 additions & 5 deletions min-turnup/phase1/azure/configure-vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ EOF

curl -sSL https://get.docker.com/ | sh

apt-get update
#apt-get dist-upgrade -y
apt-get install -y jq

systemctl start docker || true
Expand All @@ -32,8 +30,9 @@ fi
azure_file="/etc/kubernetes/azure.json"
config_file="/etc/kubernetes/k8s_config.json"

mkdir /etc/kubernetes
# these get filled in from terraform
mkdir -p /etc/kubernetes

# the following values are populated by terraform
echo -n "${azure_json}" | base64 -d > "$azure_file"
echo -n "${k8s_config}" | base64 -d > "$config_file"
echo -n "${kubelet_tar}" | base64 -d > "/etc/kubernetes/kubelet.tar"
Expand Down Expand Up @@ -66,4 +65,3 @@ EOF
chmod +x /etc/kubernetes/install.sh
/etc/kubernetes/install.sh

#sudo reboot
3 changes: 1 addition & 2 deletions min-turnup/phase2/ansible/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
TAG=v1
#IMAGE=gcr.io/mikedanese-k8s/install-k8s
IMAGE=docker.io/colemickens/install-k8s
IMAGE?=docker.io/colemickens/install-k8s

build:
docker build -t "$(IMAGE):$(TAG)" .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"volumeMounts": [
{
"name": "varetcd",
"mountPath": "/var/lib/etcd"
"mountPath": "/var/etcd"
}
]
}
Expand All @@ -56,7 +56,11 @@
{
"name": "varetcd",
"hostPath": {
"path": "/var/lib/etcd"
{% if phase1['cloud_provider'] == "gce" %}
"path": "/mnt/master-pd/var/etcd"
{% elif phase1['cloud_provider'] == "azure" %}
"path": "/var/etcd"
{% endif %}
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,19 @@ ExecStart=/usr/bin/docker run \
--cloud-config="/etc/kubernetes/azure.json" \
{% endif %}
--enable-server \
--register-node=true \
--register-schedulable={{ role == "node" }} \
--enable-debugging-handlers \
--api-servers=https://{{ master_ip }} \
--kubeconfig=/srv/kubernetes/kubeconfig.json \
{% if role == "master" %}
--config=/etc/kubernetes/manifests \
{% elif role == "node" %}
{% if role == "node" %}
--hairpin-mode=promiscuous-bridge \
--network-plugin=kubenet \
--reconcile-cidr \
{% endif %}
--cluster-dns=10.3.0.10 \
--cluster-domain=cluster.local \
--v=9
--v=2
Restart=always
KillMode=process

Expand Down

0 comments on commit 1e8a85f

Please sign in to comment.