Пікірлер
@baboomka
@baboomka 2 жыл бұрын
help please $ # docker variables for name and tag of new image # collapsed multi-line command $ chmod 400 $MASTER_SSH_KEY $ ssh -o StrictHostKeyChecking=no -i $MASTER_SSH_KEY "${MASTER_SSH_USER}@${MASTER_HOST}" "docker login -u ${CI_DEPLOY_USER} -p ${CI_DEPLOY_PASSWORD} ${CI_REGISTRY}" Warning: Permanently added '[MASKED]' (ED25519) to the list of known hosts. WARNING! Using --password via the CLI is insecure. Use --password-stdin. Error saving credentials: error storing credentials - err: exit status 1, out: `Cannot autolaunch D-Bus without X11 $DISPLAY` Cleaning up project directory and file based variables 00:01 ERROR: Job failed: exit code 1
@riansyahtohamba8215
@riansyahtohamba8215 2 жыл бұрын
Thanks tony
@raiyeshenzy1280
@raiyeshenzy1280 2 жыл бұрын
Is that possible to run docker-compose cmds to spin up more than 1 containers? Cuz I failed many times
@lsowein
@lsowein 2 жыл бұрын
Thank you!
@mounag4322
@mounag4322 2 жыл бұрын
thanks for this video it is so helpful clear and amazing but is there an other solution instead of introducing IP address as a Master Host variable .if the IP address changes must I introduce it in gitlab ci variables?
@ruechafulify
@ruechafulify 3 жыл бұрын
How to different port ssh 22 to variable gitlab config??
@jaxparrow1794
@jaxparrow1794 3 жыл бұрын
Sir, you are a life saver! THANK YOU!
@rasimatics
@rasimatics 3 жыл бұрын
Thanks :)
@tba77
@tba77 3 жыл бұрын
Good video thank you for your explanations its very clear
@stevenlee1726
@stevenlee1726 3 жыл бұрын
Oh my god. You saved my life bro. For "/builds/gitlab/gitlab.tmp/MASTER_SSH_KEY": invalid format error, You have to add new line to ssh key file
@tonyb5006
@tonyb5006 3 жыл бұрын
I am glad to help. ... Actually this new line on the end of SSH key depends on something external. Maybe Gitlab version, maybe something else. Not sure, but sometimes I need to test both versions.
@laxmansingh6035
@laxmansingh6035 3 жыл бұрын
how to deploy GitLab repo to VPS directly (without docker)?. I did not find any tutorial about it because most tech users just copy-pasting from another site to own site.
@tonyb5006
@tonyb5006 3 жыл бұрын
Hello. :-). You could totally skip docker image building stage in CI. And in deploy stage install and use lftp. Here is my example for uploading via FTP. But you need to add FTP access on you VPS. gist.github.com/antoninbouchal/9e8bc8e2d1316ef61e2f3e517952bab2 But it should work with SFTP (SSH access) too. But I never used that. For running application on VPS background, you can use supervisor. If you have your own VPS, I strongly recommend use docker. Good luck and let me know if you could handle it. :-).
@GiordieTN
@GiordieTN 3 жыл бұрын
Could this approach be adopted to deploy to several VPS instances?
@tonyb5006
@tonyb5006 3 жыл бұрын
Hi. ... Yes. ... Theoretically it is possible and there is no reason why it should not work. ... But this is really simple script, which is not good for production applications. There is small chance, that it can fail and not start updated service. So if you have more servers, the risk is bigger. You can change the strategy of deploying like first download new docker image to all servers, and then start them. And if something of it will fail, rollback it. Or there is many other tools which is harder to configure, but it has many benefits.
@GiordieTN
@GiordieTN 3 жыл бұрын
@@tonyb5006 thanks man :) may I ask what are the tools you refer to?
@tonyb5006
@tonyb5006 3 жыл бұрын
@@GiordieTN You can use for example terraform, or chef. But this is another devops level.
@eghosaaagunu856
@eghosaaagunu856 4 жыл бұрын
Thanks for uploading this video.I got this error:Load key "/builds/gitlab/gitlab.tmp/MASTER_SSH_KEY": invalid format
@antoninbouchal4722
@antoninbouchal4722 3 жыл бұрын
Sorry for late answer ... Sometimes you need to add empty row to the end of Gitlab Variable with SSH key. Try it and let me know please. :-).