0

goes anyone knwos how to modify the ip_adress of a gitlab_runner ? Its is always grey, i can't modify it. Please if you can help don't hesitate.

Thank you, captoin

monkey2
  • 31
  • 1
  • 7
  • That's the runner's IP. If you want to use a runner on another addres you need to register a new one. – szatkus Jul 06 '20 at 19:57

1 Answers1

0

Longer answer.

That's the runner's IP. If you want to use a runner on another addres you need to register a new one.

From GitLab panel:

Set up a specific Runner manually

szatkus
  • 1,292
  • 6
  • 14
  • First thank you for your response. @szatkus , thats exactly what i did, what i want to do configuring a new runner, is to configure it on an ip_adress of a deploy server. My server name is: **LCL.local.cp** that corresponds to an other ip_address. PLease tell me if im not clear. Thank you – monkey2 Jul 06 '20 at 21:11
  • To be honest I'm confused. GitLab runners are used for CI/CD. I don't think that using them as a deploy server is possible or even right. But in fact you can use them to deploy code on some external server. If you want to provide an IP address you can use GitLab variables (with a "secret" flag, so it won't visible in logs). I'm sorry if I'm telling the obvious, but without bigger picture I needed to make a lot of assumptions. – szatkus Jul 06 '20 at 22:03
  • thank you for your response @szatkus im beginner using gitlab, please do you know how can i add a server on gitlab ? i finished the configuration with gitlab-ci and i need to add the server on gitlab that's why i was aiming to configure the server on the runner. Please if you have an idea don't heditate. – monkey2 Jul 06 '20 at 22:24
  • **stage_gitlabci**: job_deploy_prod: stage: deploy only: - tags environment: name: prod variables: SERVER: LCL.local.cp script: - ssh $SSH_OPTS -i $HOME/.ssh/id_rsa $SERVER "docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com" - ssh $SSH_OPTS -i $HOME/.ssh/id_rsa $SERVER "docker pull $CI_IMAGE_COMMIT_TAG" - ssh $SSH_OPTS -i $HOME/.ssh/id_rsa $SERVER "docker run -v /var/run/docker.sock:/var/run/docker.sock -v /etc/localtime:/etc/localtime -d --name project $CI_IMAGE_COMMIT_TAG /bin/bash -c '/usr/sbin/cron -f -L 15'" tags: docker – monkey2 Jul 06 '20 at 22:29
  • above my stage of gitlabci to deploy on prod – monkey2 Jul 07 '20 at 08:12