{"id":17173453,"url":"https://github.com/mqasimsarfraz/scalable-web-app","last_synced_at":"2026-04-20T09:02:33.771Z","repository":{"id":173704766,"uuid":"83875547","full_name":"mqasimsarfraz/scalable-web-app","owner":"mqasimsarfraz","description":"A simple web application packaged and managed by combination of Kubernetes  and Docker.","archived":false,"fork":false,"pushed_at":"2017-03-10T12:25:57.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-30T00:48:57.157Z","etag":null,"topics":["docker","dockerfile","kubernetes","kubernetes-service","nginx"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mqasimsarfraz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-04T07:33:26.000Z","updated_at":"2017-03-05T17:53:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"4c90cfd5-b437-4ada-9f85-a0385faedb19","html_url":"https://github.com/mqasimsarfraz/scalable-web-app","commit_stats":null,"previous_names":["mqasimsarfraz/scalable-web-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mqasimsarfraz%2Fscalable-web-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mqasimsarfraz%2Fscalable-web-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mqasimsarfraz%2Fscalable-web-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mqasimsarfraz%2Fscalable-web-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mqasimsarfraz","download_url":"https://codeload.github.com/mqasimsarfraz/scalable-web-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245347325,"owners_count":20600472,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","dockerfile","kubernetes","kubernetes-service","nginx"],"created_at":"2024-10-14T23:51:15.117Z","updated_at":"2026-04-20T09:02:28.740Z","avatar_url":"https://github.com/mqasimsarfraz.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scalable-web-app\nA client-server based application to demonstrate deployment and packaging abilities of Kubernetes and Docker combination. Following is the list of tools along with useful documentation:\n\n- [Docker](https://docs.docker.com/) - Container runtime for packaging applications.\n- [Kubernetes](https://kubernetes.io/docs/) - Cluster manager for life cycle management of applications.\n- [Minikube](https://kubernetes.io/docs/getting-started-guides/minikube/) - Kubernetes flavor for single node developement environment. \n- [Docker Registry](https://hub.docker.com/u/smqasims/) - Docker registry hosting application images. \n\nYou will need a kubernetes environment for running the application. Please refer to above documentation for k8s installation.\n\n## server\nThe server is a docker based nginx server hosting our favourite ```Hello,World``` page. The docker image for server is available [here](https://hub.docker.com/r/smqasims/server/).\n## client\nThe client is a cURL based utility that will be used to send periodic HTTP requests to the server. The docker image for client is available [here](https://hub.docker.com/r/smqasims/client/).\n\n## get the code\nDownload the code using git:\n```\n$ git clone https://github.com/MQasimSarfraz/scalable-web-app.git\n```\n\n## Deployments\nAll the entities will be deployed via ```kubectl``` utility using respective ```yaml``` files. All the deployment files are kept in ```scalable-web-app/kubernetes```\n\n### server deployment\nDeploy the server using:\n```\n$ kubectl create -f kubernetes/deployments/server.yaml\n```\nYou can verify that the server is running using:\n```\n$ kubectl get deployment server\n$ kubectl describe deployment server\n```\nFor the server to be accessible it needs to be exposed as a service using: \n```\n$ kubectl create -f kubernetes/services/server.yaml\n```\n\n### client deployment\nClient issues periodic HTTP request to server and has following configurable attributes:\n\n- Time between each request (optional)\n\nYou can configure the time for HTTP request in ```client.yaml```. The format of the schedule string is explained [here](https://en.wikipedia.org/wiki/Cron). Now deploy client using:\n```\n$ kubectl create -f kubernetes/deployments/client.yaml\n```\n\n### scaling server\nIn order to scale the server, update the ```replicas``` in ```kubernetes/deployments/server.yaml``` to the required number of server. Once done scale the servers using:\n```\n$ kubectl apply -f kubernetes/deployments/server.yaml\n```\n### updating server\nThe server has two versions available:\n- server v1 with nginx 1.10.1\n- server v2 with nginx 1.11.1\n\nBoth of these images are available at [smqasims](https://hub.docker.com/u/smqasims/) docker registry. By default ```server:v1``` is deployed. \n\nIn order to update the server, update the ```image``` in ```kubernetes/deployments/server.yaml``` to the the newer version i.e  ```smqasims/server:v2```. Once done update the servers using:\n```\n$ kubectl apply -f kubernetes/deployments/server.yaml\n```\n## Docker images\nImages can be uploaded using ```scalable-web-app/app/build-image.sh``` script. Specify the required tags of images in the script and run it using:\n```\n$ chmod +x build-image.sh\n$ ./build-image.sh\n```\n## Cleanup\nCleanup the application using ```scalable-web-app/kubernetes/scripts/cleanup.sh``` script:\n```\n$ chmod +x cleanup.sh\n$ ./cleanup.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmqasimsarfraz%2Fscalable-web-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmqasimsarfraz%2Fscalable-web-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmqasimsarfraz%2Fscalable-web-app/lists"}