DEV Community

Discussion on: Deploying Django applications with docker swarm on DigitalOcean using GitLab CI, Traefik, NGINX and REX-Ray

Collapse
 
guglielmo profile image
Guglielmo Celata • Edited

Hi Brian! Just tried out all of this, and using a self-hosted gitlab-ce solution. It works, but I am just finding some difficulties using the REX-Ray storage plugin volumes.

At first they were not mounted properly, got a "Rexray VolumeDriver.Mount: ControllerPublishVolume failed" error in the docker stack ps my-stack --no-trunc output; postgres and rails could not start, due to this, they only started after 30 minutes ... but this is not really reproducible, so I don't really know, I'll try to repeat the whole process and see what happens.

Then, once all services were running, executing the collectstatic management task when connected to the backend container, fails with a OSError: [Errno 5] Input/output error: '/code/assets/static' error; and as a matter of fact, I get this when trying to fetch the dir content:

  root@19992f15b655:/code# ls -l /code/assets/
  ls: reading directory '/code/assets/': Input/output error
Enter fullscreen mode Exit fullscreen mode

And it seems the directory was also mounted as readonly

root@19992f15b655:/code# mount  | grep assets
/dev/sdb on /code/assets type ext4 (ro,relatime)
Enter fullscreen mode Exit fullscreen mode
Collapse
 
briancaffey profile image
Brian Caffey

Hi Guglielmo, thanks for trying this out and letting me know that you had issues. I'm glad this works on your self-hosted GitLab. Since it is using docker-in-docker, I think those jobs need to be executed using privileged mode, but it sounds like that is not an issue for you. That's interesting about the collectstatic command and REX-Ray issue. This was my first time using REX-Ray, and I mostly followed along with the DigitalOcean post that I linked to in my article.

I do need to try running through everything else one more time. There may be some differences between how I incrementally deployed things vs deploying everything all at once. If I come across any issues or solutions to those issues I will check back here and let you know!

Collapse
 
guglielmo profile image
Guglielmo Celata

Thanks!
I had set the privileged mode to True in the docker section of my gitlab runners configuration, but didn't mention it, because I thought it had to do with my particular environment.