Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joanroucoux/node-docker-kubernetes-jenkins
Deploy a Node JS app on Kubernetes using Jenkins and Docker
https://github.com/joanroucoux/node-docker-kubernetes-jenkins
docker jenkins kubernetes nodejs
Last synced: 17 days ago
JSON representation
Deploy a Node JS app on Kubernetes using Jenkins and Docker
- Host: GitHub
- URL: https://github.com/joanroucoux/node-docker-kubernetes-jenkins
- Owner: JoanRoucoux
- Created: 2023-01-22T12:41:49.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-09-08T04:50:46.000Z (over 1 year ago)
- Last Synced: 2024-11-18T11:24:44.474Z (3 months ago)
- Topics: docker, jenkins, kubernetes, nodejs
- Language: JavaScript
- Homepage:
- Size: 43.9 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node JS app on Kubernetes using Jenkins and Docker
## Steps
1. Build a simple Node JS app
2. Create a Docker image
3. Push the image to Docker Hub
4. Start a Jenkins Docker container and configure plugins
5. Link your repository to the container using Ngrok
6. Create the pipeline
7. Add a step to deploy on K8S on somewhere else## Jenkins pipeline demo
![jenkins-pipeline-demo](https://user-images.githubusercontent.com/21682157/213929633-7b3d48ee-7885-4afa-86a9-ee0bb662d9b7.gif)### Jenkins Docker container
This also makes your local Docker usable by the container without having to install it.
```
$ docker run -it -u root -d \
-p 8080:8080 \
-p 50000:50000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /usr/bin/docker:/usr/bin/docker \
-v /var/jenkins_home:/var/jenkins_home \
--name jenkins jenkins/jenkins:lts
```### GitHub hook and Ngrok
This creates a tunnel between your local Jenkins container and internet so that GitHub can push events when new commits arrive.
`$ docker run --rm -it --name ngrok --link jenkins shkoliar/ngrok http jenkins:8080`On GitHub, add a webhook attached to your repository `/github-webhook/`.