Skip to content

Commit

Permalink
Run Nameko Examples on Kubernetes (#1)
Browse files Browse the repository at this point in the history
* k8s Deployment files created

* Ingress added. Fixes to products config file.

* Definitions converted to charts

* Tutorial added

* Readme updates

* Update to Readme

* Nameko loves Kubernetes

* Update to Readme

* Update to readme.

* Update to Readme

* Readme updates

* Bump nameko version
  • Loading branch information
kooba authored Jan 12, 2018
1 parent 869c39b commit 57b7d62
Show file tree
Hide file tree
Showing 26 changed files with 599 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ build-images: run-wheel-builder
build: build-images

docker-login:
docker login --email=$(DOCKER_EMAIL) --password=$(DOCKER_PASSWORD) --username=$(DOCKER_USERNAME)
docker login --password=$(DOCKER_PASSWORD) --username=$(DOCKER_USERNAME)

push-images: build
for image in $(IMAGES) ; do make -C $$image push-image; done
2 changes: 1 addition & 1 deletion docker/docker.base
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM debian:jessie
RUN apt-get update && \
apt-get install -qyy \
-o APT::Install-Recommends=false -o APT::Install-Suggests=false \
python3 python-pip ca-certificates libpq-dev python-psycopg2 curl netcat && \
python3 python-pip ca-certificates libpq-dev python-psycopg2 curl netcat rlwrap telnet && \
cd /usr/local/bin && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
Expand Down
2 changes: 1 addition & 1 deletion gateway/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ done

# Run Service

nameko run --config config.yml gateway.service --backdoor 3002
nameko run --config config.yml gateway.service --backdoor 3000
2 changes: 1 addition & 1 deletion gateway/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
packages=find_packages(exclude=['test', 'test.*']),
install_requires=[
"marshmallow==2.9.1",
"nameko==2.6.0",
"nameko==2.8.3",
],
extras_require={
'dev': [
Expand Down
48 changes: 48 additions & 0 deletions k8s/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
CONTEXT ?= minikube
NAMESPACE ?= examples
TAG ?= latest

deploy-namespace:
kubectl --context=$(CONTEXT) apply -f namespace.yaml

# helm

test-chart:
helm upgrade $(SERVICE_NAME) charts/$(SERVICE_NAME) --install \
--namespace=$(NAMESPACE) --kube-context $(CONTEXT) \
--dry-run --debug --set image.tag=$(TAG)

install-chart:
helm upgrade $(SERVICE_NAME) charts/$(SERVICE_NAME) --install \
--namespace=$(NAMESPACE) --kube-context=$(CONTEXT) \
--set image.tag=$(TAG)

lint-chart:
helm lint charts/$(SERVICE_NAME) --strict

test-gateway: SERVICE_NAME=gateway
test-gateway: test-chart

test-orders: SERVICE_NAME=orders
test-orders: test-chart

test-products: SERVICE_NAME=products
test-products: test-chart

install-gateway: SERVICE_NAME=gateway
install-gateway: install-chart

install-orders: SERVICE_NAME=orders
install-orders: install-chart

install-products: SERVICE_NAME=products
install-products: install-chart

lint-gateway: SERVICE_NAME=gateway
lint-gateway: lint-chart

lint-orders: SERVICE_NAME=orders
lint-orders: lint-chart

lint-products: SERVICE_NAME=products
lint-products: lint-chart
Loading

0 comments on commit 57b7d62

Please sign in to comment.