parkingology / parking-dev-env

0 stars 0 forks source link

create minimal environment for microservices 🍻 #3

Open tokuchar opened 2 years ago

tokuchar commented 2 years ago

with Jenkinsfile and docker-compose create:

++stage to test if each part of the env responds correctly ;)

tokuchar commented 2 years ago

to run docker from jenkins (on the same docker host) whe must create DID (docker in docker) https://shisho.dev/blog/posts/docker-in-docker/

follow the instruction for debian, but you must install only docker-ce: https://docs.docker.com/engine/install/debian/ and inside root user in docker we must:

chmod 777 /var/run/docker.sock
tokuchar commented 2 years ago

https://stackoverflow.com/questions/43183495/how-to-dynamically-pick-a-git-branch-to-use-in-jenkins-build

KleczkoPawel commented 2 years ago

[Jenkins] Working on dynamically branch picking.

KleczkoPawel commented 2 years ago

[Jenkins] Dynamically branch picking option has been added.

tokuchar commented 2 years ago

to install docker-compose:

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
tokuchar commented 2 years ago
logstash:
    container_name: logstash
    image: logstash:7.16.3
    ports:
      - '5002:5000'
      - '9600:9600'
    volumes:
      - type: bind
        source: /home/opc/jenkins_data

/home/opc/jenkins_data must be mapped in jenkins container and OCI and ports.conf must be moved by jenkins to this dir

tokuchar commented 2 years ago

docker memory limits does not work in version 3* in docker compose here is how to resolve it: https://nickjanetakis.com/blog/docker-tip-78-using-compatibility-mode-to-set-memory-and-cpu-limits

tokuchar commented 2 years ago

we need to install pipeline-utility-steps on jenkins host