5 ms·
We are currently on Github and are using CoreOS' Quay.io private Docker registry with Github hooks for automated build creation. Total cost: $50/month for Githu
by HorizonXP 10y ago
We are currently on Github and are using CoreOS' Quay.io private Docker registry with Github hooks for automated build creation. Total cost: $50/month for Github for private repos, and $100/month for CoreOS' managed service that includes Quay.io.
Years ago, I did set up our own private Docker registry and build server, but it was a lot of work to setup and maintain, so I killed it. Hopefully and probably, that's become easier to do today.
However, last night, I decided that I had had enough with our current setup (it's slow, expensive, and cumbersome), and moved to GitLab. Here were the steps:
1. Create an account.
2. Create a repository, and select the option to import from Github.
3. Connect my Github account, and import all of our private repositories.
4. Ensure Container Registry was enabled for the repositories.
5. Create a .gitlab-ci.yaml file in each repository to build our Docker images. (https://docs.gitlab.com/ce/ci/docker/using_docker_build.html https://docs.gitlab.com/ce/ci/docker/using_docker_build.html)
6. Decide that I didn't want to use the Shared Runners.
7. Spin up an EC2 Ubuntu instance, install GitLab's multi-runner. (https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-repository.md https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/ma...)
8. Add the new runner to each repo.
9. Start a build to ensure Docker image gets built.
In less than 10 steps, I was able to migrate all of our code and CI to GitLab, in less than 2 hours. With the repository mirroring, Github can remain synced to GitLab, so that I have time to modify our deployment scripts to use the GitLab URLs instead. I'll be cancelling our GitHub and CoreOS subscriptions this week.
As our team grows, we will likely host GitLab on our own servers, and I expect that will go smoothly. I'll be happy to pay them at that time. Right now, I'm really happy with this migration.
- sytse 10y agoGreat to hear you had such a good experience and that the integrated container registry was so easy to use.
- daveguy 10y agoI would love to hear how this is running for you after a month -- when some of the edge cases have been poked. It would be good to know if you run into problems or if it is still going as smoothly as the initial setup. I switched over to GitLab for a static blog when I realized I could use the free shared runners to compile any static site generator out there. Such a beautiful feature. I would be interested to hear how it holds up in a production environment.
- StavrosK 10y agoWe've been using it in production for months, and it's as great as it was the first day. I've also made a static blog with the Gitlab runner, and my experience has been similarly positive.
- komali2 10y agoDo either of you mind linking to your static blogs or an article discussing your process here? I've only ever used a wordpress install for blogging but have been thinking about just building a static blog from scratch.
- connorshea 10y agoHere's mine: https://connorshea.gitlab.io https://connorshea.gitlab.io, repo here: https://gitlab.com/connorshea/connorshea.gitlab.io https://gitlab.com/connorshea/connorshea.gitlab.io Danger recently moved their site over (https://gitlab.com/danger-systems/danger.systems https://gitlab.com/danger-systems/danger.systems, https://danger.systems/ https://danger.systems/) if you want another example. We have a bunch of working example sites in a bunch of different static site generators at the "pages" group: https://gitlab.com/groups/pages https://gitlab.com/groups/pages Jekyll, Middleman, Pelican, Metalsmith, Octopress, Nanoc, etc. etc. All working examples. We also have gitlab-ci.yml templates if you create the YML file via the web editor, so for many of these you can get a simple site deploying pretty quick. And if you want a bit more guidance we have a series of blog posts on static sites & GitLab Pages: https://about.gitlab.com/2016/06/03/ssg-overview-gitlab-pages-part-1-dynamic-x-static/ https://about.gitlab.com/2016/06/03/ssg-overview-gitlab-page... Personally I'd recommend Jekyll, but it really depends on what languages you're comfortable in :) (Shout-out to Marcia, Axil, Kamilt, and others for helping build out Pages and these examples over the last while, really awesome resources!)
- sytse 10y agoThanks for commenting Connor!
- 10y ago
- cedricziel 10y agoThat's exactly my experience. I used the docker omnibus containers to get quickly up and running. Running, supervising and updating is a pleasure in combination with docker-compose. As for CI, I utilized the docker-machine runner so we could autoscale based on demand. Big plus: With Google Cloud Platform, we can leverage preemptible VMs for the runners (not for the coordinator of course), so the cost is really low.
- sytse 10y agoAwesome, if you're using Google Cloud you'll be happy to hear that we just merged Kubernetes support for Runner creation https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/merge_requests/30 https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/merge_r... Giving you the option to use Google Container engine to spin up new Runners.
- HorizonXP 10y agoThis is awesome! Our whole stack runs on Kubernetes, so this kind of integration is very welcome!
- sytse 10y agoGlad to hear that. And many thanks to James Munnelly for being patients with me and the rest of our team over the period of a year to get this done.
- swozey 10y agoThis is fantastic. Right now I use GCE autoscaling groups to spin up runners while I've got several kubernetes clusters running 24/7. It'll be nice to utilize those for builds (especially with how fast the scheduler is) going forward. Saves money, as well.
- sytse 10y agoAwesome, glad to hear you can make use of this.
- hackerboos 10y agoI've pretty much done all the steps you've listed. My problem now is how to get those build docker images onto servers somewhere. What services are people using for that?
- StavrosK 10y agoI haven't tried it, but I think you just do "docker pull <your gitlab repo index url>".
- jadbox 10y agoI'm working on an open source project that does just that: deploy container updates. It's not available just yet, but you can follow me for when I announce it. https://twitter.com/jadbox https://twitter.com/jadbox
- sytse 10y agoYou can also deploy from GitLab, see https://about.gitlab.com/2016/08/26/ci-deployment-and-environments/ https://about.gitlab.com/2016/08/26/ci-deployment-and-enviro... for an introduction.
- kt9 10y agoCheck out Distelli - https://www.distelli.com https://www.distelli.com Disclaimer: I'm the founder
- swozey 10y agoGitlab-ci can do this easily with the gitlab-ci-multirunner docker image. My CI/CD spins up multirunners in autoscaling groups and those said multirunners (it's basically a docker container with privilege mode to spin up the Dockerfiles of whatever you're building) handle the builds, whether they're node or ruby or anything else I've made into docker images.