From 1cb622cb98a8e5927d41124eed92edbf9dcb4fe3 Mon Sep 17 00:00:00 2001
From: Thomas  MENARD <thomas.menard@pasteur.fr>
Date: Thu, 6 Jun 2019 12:37:02 +0200
Subject: [PATCH] Update README.md

---
 README.md | 38 ++++++++++++++++++++++++++++++++------
 1 file changed, 32 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index ae41339..ff6d78c 100644
--- a/README.md
+++ b/README.md
@@ -68,7 +68,7 @@ RUN pip install --default-timeout=100 --upgrade pip && pip install -r /app/requi
 # We add the current content of the git repo in the /app directory
 ADD . /app
 WORKDIR /app
-RUN rm -rf .gitlab-ci.yml Dockerfile README.md img 
+RUN rm -rf .gitlab-ci.yml Dockerfile README.md img solution
 # We use the CMD command to start the gunicorn daemon
 # when we start the container.
 # Note the $PORT variable, we will need to define it when we start the container
@@ -333,7 +333,7 @@ metadata:
   name: polls
 spec:
   rules:
-  - host: ${GITLAB_USER_LOGIN}.k8s-dev.pasteur.fr
+  - host: ${GITLAB_USER_LOGIN}-${CI_PROJECT_NAME}.k8s-dev.pasteur.fr
     http:
       paths:
       - backend:
@@ -398,12 +398,11 @@ deploy:
   stage: deploy
   image: registry-gitlab.pasteur.fr/dsi-tools/docker-images:docker_kubernetes_image
   variables:
-    NAMESPACE: "<your gitlab user>-django"
+    NAMESPACE: ${GITLAB_USER_LOGIN}-${CI_PROJECT_NAME}
   environment:
-    name: <your gitlab user>-django
-    url: https://<your gitlab user>-django.k8s-dev.pasteur.fr
+    name: ${GITLAB_USER_LOGIN}-${CI_PROJECT_NAME}
+    url: https://${GITLAB_USER_LOGIN}-${CI_PROJECT_NAME}.k8s-dev.pasteur.fr
   script:
-    - yum install -y gettext
     - kubectl delete secret registry-gitlab -n ${NAMESPACE} --ignore-not-found=true
     - kubectl create secret docker-registry -n ${NAMESPACE} registry-gitlab --docker-server=registry-gitlab.pasteur.fr --docker-username=${DEPLOY_USER} --docker-password=${DEPLOY_TOKEN} --docker-email=kubernetes@pasteur.fr
     - envsubst < manifest.yaml | kubectl apply -n ${NAMESPACE} -f -
@@ -412,7 +411,34 @@ deploy:
     - kubectl patch deployment polls -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"`date +'%s'`\"}}}}}"
 ```
 
+### Take a look at your Gitlab CI pipeline
+
+If everything goes well, you should see that you have a pipeline with two steps:
+- build
+- deploy
+
+You can see the log output by clicking on each one
+
+### Informations available in Gitlab
+
+Gitlab offer a basic set of features in order to manage your Kubernetes web application.
+In the `Operations` section on the left panel you are able to view :
+* Metrics : It will display basic memory and cpu graphs
+* Environements : It will list all the environements you have created (you can have several deploy stages in your `.gitlab-ci.yml` : dev, stagging, production....) and give direcrt access to : 
+  * Website link
+  * Monitoring
+  * Open a remote shell on the container
+* Error Tracking : If your application implement error tracking on [sentry]: https://sentry.io/ errors are displayed here.
+* Serverless : Feature not available here at Pasteur
+
 ## What else ?
+### Is my deployed application is working ?
+
+Now we want to know if what we have done is working; to do that just go in `Operations/Environements` and click on the first icon on the right hand side, it should open your web app.
+
+You may have a `404 page not found` error, that's unfortunately normal for the first deployement.
+
+
 ### Kubernetes dashboard
 #### View your running workload
 
-- 
GitLab