Showing posts with label jenkins. Show all posts
Showing posts with label jenkins. Show all posts

Friday, January 3, 2020

running simple django application in aws


By default, only SSH has been enabled in the security for the fresh server in AWS


Change the security group








Add another rule for port 8000



Viola


Installing Supervisor
sudo apt-get install -y supervisor

in /etc/supervisor/conf.d create gunicorn.conf file

sudo mkdir /var/log/gunicorn
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl status

in /etc/nginx/sites-available create django-simple.conf file



sudo nginx -t
sudo ln django-simple.conf /etc/nginx/sites-enabled/



static files and image were not loaded properly



add this line



sudo systemctl nginx reload

Thursday, April 4, 2019

Installing Jenkins with Docker in new approach

Install Jenkins

  • Running Jenkins as a Docker container
  • Interacting with the Docker host from Jenkins

$ docker volume create jenkins

To identify docker group id
$ getent group docker
docker:x:998:vagrant

Run the container and to save the jenkins configuration into jenkins volume
$ docker run -v jenkins:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock --group-add 998 --name jenkins dockerhp/jenkins


$ docker run -v jenkins:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock --group-add 998 -d --name jenkins dockerhp/jenkins 

To figure out the ip address of jenkins
$ docker inspect -f '{{.NetworkSettings.Networks.bridge.IPAddress}}' jenkins
172.17.0.2

To view the secret password
$ docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword


Install plugin
Git plugin

Tuesday, March 19, 2019

How to setup Jenkins and Docker

So I want to learn CI/CD and I want to try this in my work. The setup would be docker, jenkins and odoo as the application.

These are the steps:

1. Pull official jenkins image.
docker pull jenkins

2. Create empty folder
/var/jenkins_home

2. Run the docker, will add the volume to map our local from the container.
docker run -u root --rm -p 8080:8080 -p 50000:50000 -v /var/jenkins_home:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock jenkinsci/blueocean







reference:
https://hub.docker.com/r/jenkinsci/blueocean/

free online comma separating tool

https://delim.co/#