Gitlab CI deploy to VPS through SSH

  Рет қаралды 17,877

Tony B

Tony B

Күн бұрын

Link to Gitlab CI config file and used links:
gist.github.co...

Пікірлер: 19
@tba77
@tba77 3 жыл бұрын
Good video thank you for your explanations its very clear
@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?
@riansyahtohamba8215
@riansyahtohamba8215 2 жыл бұрын
Thanks tony
@jaxparrow1794
@jaxparrow1794 3 жыл бұрын
Sir, you are a life saver! THANK YOU!
@rasimatics
@rasimatics 3 жыл бұрын
Thanks :)
@raiyeshenzy1280
@raiyeshenzy1280 2 жыл бұрын
Is that possible to run docker-compose cmds to spin up more than 1 containers? Cuz I failed many times
@ruechafulify
@ruechafulify 3 жыл бұрын
How to different port ssh 22 to variable gitlab config??
@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. :-).
@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. :-).
@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.
@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
How to design a modern CI/CD Pipeline
9:59
DevOps Journey
Рет қаралды 136 М.
Why is Laravel NOT used in Big Development Projects?
11:53
Stefan Mischook
Рет қаралды 180 М.
哈莉奎因怎么变骷髅了#小丑 #shorts
00:19
好人小丑
Рет қаралды 55 МЛН
规则,在门里生存,出来~死亡
00:33
落魄的王子
Рет қаралды 26 МЛН
Как мы играем в игры 😂
00:20
МЯТНАЯ ФАНТА
Рет қаралды 3,3 МЛН
GitLab CI/CD - Providing your own docker runners
14:17
Javier Moreno
Рет қаралды 3,3 М.
В прод с помощью GITLAB CI/CD. На простом примере. Основы.
11:51
Мир IT с Антоном Павленко
Рет қаралды 102 М.
Using docker in unusual ways
12:58
Dreams of Code
Рет қаралды 451 М.
The cloud is over-engineered and overpriced (no music)
14:39
Tom Delalande
Рет қаралды 625 М.
GitLab CI/CD | GitLab Runner Introduction | 2022
23:28
Tech and Beyond With Moss
Рет қаралды 126 М.
you need to learn tmux RIGHT NOW!!
17:46
NetworkChuck
Рет қаралды 544 М.
GitLab CI/CD pipeline for React projects (GitLab + React + Netlify)
28:04
哈莉奎因怎么变骷髅了#小丑 #shorts
00:19
好人小丑
Рет қаралды 55 МЛН