-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
196 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ Content | |
:maxdepth: 4 | ||
|
||
installation | ||
runinkubernetes | ||
quickstart | ||
structure | ||
configuration | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
Run in kubernetes | ||
================= | ||
|
||
Use MS with Docker | ||
------------------ | ||
`Install docker <https://docs.docker.com/install/>`_ | ||
|
||
|
||
Use MS with Kubernetes localy | ||
----------------------------- | ||
Configure your service.yaml (TODO: create docs to configure kubernetes service.yaml) | ||
|
||
* Installing Kubernetes... | ||
|
||
.. code-block:: bash | ||
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.9.0/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/ | ||
* Installing Minikube... | ||
|
||
.. code-block:: bash | ||
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/ | ||
Start minikube and set the environment of docker | ||
|
||
.. code-block:: bash | ||
minikube start | ||
eval $(minikube docker-env) | ||
kubectl config use-context minikube | ||
If a shell isn't your friend. You could use kubernetes web panel to see your pods: | ||
|
||
.. code-block:: bash | ||
minikube dashboard | ||
Create your image | ||
|
||
.. code-block:: bash | ||
docker build -t template:v1 . | ||
Deploy your images localy: | ||
|
||
.. code-block:: bash | ||
kubectl apply -f service.yaml | ||
minikube service template | ||
Clean your environment | ||
|
||
.. code-block:: bash | ||
kubectl delete template | ||
kubectl delete template | ||
docker rmi template:v1 -f | ||
minikube stop | ||
eval $(minikube docker-env -u) | ||
minikube delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,6 @@ | ||
import opentracing | ||
import requests | ||
from flask_opentracing import FlaskTracer | ||
|
||
from pyms.healthcheck import healthcheck_blueprint | ||
|
||
|
||
@healthcheck_blueprint.route('/healthcheck', methods=['GET']) | ||
def healthcheck(tracer: FlaskTracer): | ||
span = tracer.get_span() | ||
headers = {} | ||
tracer._tracer.inject(span, opentracing.Format.HTTP_HEADERS, headers) | ||
result = requests.post(url="http://localhost:8081/oauth/login", data={ | ||
"username": "test", | ||
"password": "1234" | ||
}, headers=headers) | ||
return result.content | ||
def healthcheck(): | ||
return "OK" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from pyms.logger.logger import CustomJsonFormatter |
Oops, something went wrong.