Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minikube technical screen (Chandra kothapally) #18

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://docs.docker.com/engine/reference/builder/

# base this image on the PHP image that comes with Apache https://hub.docker.com/_/php/
FROM httpd:latest

# Run Apache
ADD test-app/ /usr/local/apache2/htdocs/
45 changes: 33 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,42 @@
# webdeploy
The purpose of this repo is to house the Code to be used for technical screen of SRE candidates
# Steps to Re-produce stateless application deployment and rolling updates. #

##

1. Demonstrate three instances of this website running
2. Demonstrate procedures for deploying an updated change to the instances from #1
3. Provide code as a pull request to this repo
4. Solutions can be in the language of your choice
5. Technology of your choice
## Create a Dockerfile to add the frontend assets and build the image from root directory ##

docker build .

## Create a docker private or local registry to push the image updates ##

### Some Suggestions
## Login to docker registry to authenticate yourself ##

We are looking to see what you are doing, We are not going to do anything to trick you but put your best foot forward. Demonstrate a working demo, feel free to exhibit your skills.
docker login (prompts for username and password)

## Tag and push the image to the registry ##

###
docker tag $IMAGEID repo/image:tag
docker push repo/image:tag
sadxacacaddc
## To run a kubernetes cluster with the container pushed to local or private registry ##

[How to submit a pull request](https://help.github.com/articles/creating-a-pull-request)
kubectl run $container --image=repo/image:tag --port=80

## To Expose as a service ##

kubectl expose deployment $container --type=NodePort

## To open the exposed endpoint in the browser ##

minikube service $container
(This will open the html page on the browser)

## View the kubernetes dashboard via ##

minikube dashboard

## For any rolling updates, Update the image to latest version and push it to registry again ##
kubectl set image deployment/$container $container =repo/image:tag
(Leveraging rolling updates will benefit in Zero downtime)

## To achieve a multi instance pod, we can scale the deployment to the number desired. ##

![alt text](https://github.com/chandrakothapally/webdeploy/blob/master/scale_deployment.png)
1 change: 1 addition & 0 deletions ml-common/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Binary file added scale_deployment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions test-app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

<title>An HTML5 Test Page</title>
<meta name="description" content="An HTML5 Test page">
<meta name="author" content="Watchmen">
<meta name="author" content="Watchmen1">
<h1> Updated pod</h1>

<link rel="stylesheet" href="css/styles.css?v=1.0">

Expand All @@ -16,4 +17,4 @@
<script src="js/scripts.js"></script>
<img src="images/watchmen-logo-slice-600x200.jpg"/>
</body>
</html>
</html>