How to set up continuous deployment using free hosted tools
simonwillison.net
simonwillison.net
FYI: I am in no way affiliated with Gitlab.
I've moved all my sites to Gitlab pages generated via Hugo or Jekyll.
Uptime (via Uptime Robot) just doesn't seem as good as GitHub, but it's not bad.
uuh, what?
i think gitlab pages are wonderful, because you're not restricted to jekyll, but how is it easier to setup? you only need to toggle the checkpoint in the repository settings...
Edit: And what I said in original comment. Gh_pages branch was required, but Gitlab could just use the built assets.
To me, GitHub still is the gold standard and will likely be for quite some time.
I find GitLab is better on a few point. You can theme it from about 4-5. I prefer the dark theme as it matches my IDE and easier on my eyes. You can also have comments marked as addressed. By default the changes are shown in the page but you can also choose to show side-by-side like in GitHub.
You can host it yourself. It ties in very well to it's own CI/CD service and comes with a docker registry. So your code can be tied easily to your deploys and you see this in the issues.
I absolutely agree. We use Gitlab in our company for continuous deployment and it works like a charm.
Apart from the other tools I miss some performance monitoring. Sentry is great, but if your application suffers from bad performance after the latest deployment, you won't notice that soon enough.
To set it up is simply a matter of starting a Docker image and creating a .drone.yml file (very similar to .travis.yml).
Note: I'm not affiliated with the project in any way. I'm just a happy user who think the project deserves way more buzz.
Also it has a lot of emojis.
I’m currently running my blog on a single $7/month Heroku Dyno (plus $9/month for Heroku PostgreSQL) behind a free Cloudflare account - with the right caching headers I can easily handle huge amounts of read traffic. I was going to mention Cloudflare in this piece but I decided it didn’t fit the theme of continuous deployment as well as the other tools.
Small correction: It will automatically test the latest commit on every push to every branch
Codeship (https://codeship.com/features) allows forever free builds for public repos. It has support for both Continuous Integration and Delivery/Deployment. Maybe you can give it a spin as well?
At the moment there are 10+ companies that do the exact same thing.
http://blog.codepipes.com/hosted-ci-comparison/hosted-ci-com...
If you don't have time to click the link:
- Buddy Works
- CircleCI
- Codefresh
- Codeship
- DeployBot
- Distelli
- SemaphoreCI
- Shippable
- SolanoLabs
- Vexor
- WerckerAcceptance testing the system once deployed is the cornerstone of organisational acceptance of the CD doctrine - errors will always happen, it's just that they can now be fixed much faster in production.
Using an acceptance test suite as a deployment safety harness should dramatically increase the quality of tests, and hopefully the application too.
or be willing to move vendor and re-implement the stuff.
For comparison my magic combination(and not all free or realistic for everyone):
- gitlab
- jenkins/looking into gl ci
- linode/cloudafrica(ah-hah hosting is not free)
- sentry is a tough one. We rolling a custom mqttwarn/zabbix solution
- irc(fine I will take your slack and use the irc-bridge pfftt)For hosting, I am looking to host my own server for fun and learning.
You also have the option (unlike Travis) of registering your own runners in your project settings, and you can do this either on gitlab.com or another deployment, without needing to be an admin of the deployment - you can get a key for it in your own project's settings. I'm using this at work, where we have an internal GitLab that I'm not an admin of (and where the GitLab admins probably have no interest in running a CI system), to do a small bit of CI on some things using one of my team's servers as a runner.
Sentry is open source, you can self-host it...
Yup, definitely look into it. We just killed our last Jenkins instance last week after we found out that everyone eventually moved to the GitLab CI.
> - sentry is a tough one. We rolling a custom mqttwarn/zabbix solution
Why a tough one? I found Sentry easy to self-host. They have pretty good docs: https://docs.sentry.io/server/installation/
> - irc(fine I will take your slack and use the irc-bridge pfftt)
We ditched Slack for Mattermost. It's not entirely up to par (yet), but works for most use-cases. And there's an IRC bridge for it, too (https://github.com/42wim/matterbridge). Oh, and Mattermost comes bundled with GitLab in their omnibus.
your right, sentry! It was tough thinking of alternatives.
Some providers that offer Cloud Foundry including a free tier for small Apps:
- Meshcloud (hosted in Germany, 2 Locations) https://panel.meshcloud.io/#/register (Disclaimer: I'm a founder there)
- Pivotal Web Services (hosted on AWS US): https://run.pivotal.io/
- IBM Bluemix https://www.ibm.com/cloud-computing/bluemix/ (various locations, a bit more expensive than the other two though)
We use this to listen for Github webhooks and execute jobs with Saltstack.
To make this work, I use Codeship instead of Travis. Codeship builds a Docker image, runs the tests against the image, then pushes the image to Heroku if the tests pass: https://documentation.codeship.com/pro/continuous-deployment...
Online, free for small teams, Git source control, CI/build/release, supports every major build stack, not just MS. It even has a top quality agile work tracker, that I've found better (or at least more balanced) than Jira/Trello equivs.
EDIT: link: https://www.visualstudio.com/team-services/
Now I don’t need to download Hugo, remember the Hugo commands, remember my web server login details, etc. I think it’s a lot less fiddling as all I need to remember now is how to add a file to a git repo to get a post published.
I used to use team city, octopus and jenkins in previous jobs. Personally, it is really easy to use and you don't have to use the microsoft stack. It supports Python, Ruby, node etc... It feels to me like they waited to see all the good bits people have done and then just implemented them.
I didn't want to manage a server so it is perfect for me.
It would be nice to see a setup with something like Gitea[0] and/or Jenkins[1] edit and some other slack alternative like mattermost[2]
Pretty sure you can self host travis.
We're using Docker, but I'm sure the same approach can be used with simple tarballs, OS packages (.debs, etc) or deploy-specific git repo (for Heroku)
If you add the nodejs buildpack to your heroku project, it should detect and build your package.json automatically on heroku. Works with both yarn and npm.
You just need to make sure to set NODE_ENV=production in your heroku config.
https://devcenter.heroku.com/articles/nodejs-support#build-b...
Here's an example that might be useful: https://github.com/nigma/heroku-django-cookbook/blob/master/...
https://github.com/stickfigure/gstrap-skeleton/
Deployments are git checkout production; git merge master; git push. I love being able to use git log to see what changes are live.
I also need to think of the messaging system. I'll probably start using mattermost instead of slack, though; because GitLab.
Thanks for posting this. I'm looking to get any application and start deploying through a CI/CD process, to learn how this process works. Any application suggestions for a CI "Hello World"?
CD means each commit that passes tests is deployed
CI means your code is regularly integrated (merged) vs having long QA / code review cycles.
CI and CD work great together but you can have one without the other.
I've created and worked on several projects that have involved APIs, reading from Zendesk, and writing to Slack or HTML, among other places. I've supported Jenkins and related tools multiple times in production. Now I want to fill this gap in my knowledge.
Of course, you have much less control over Travis than Jenkins. Two cases where Jenkins remains obviously better are when you need custom environments that aren't easily portable to Travis (Windows support is a big one, although there is a company called AppVeyor that is something like a Travis for Windows; licensed software is another big one), or if you have strong security/confidentiality requirements (e.g., you're in a regulated industry) and using random cloud services isn't a good option.
Is it possible get get Concourse running entirely on free tier stuff? I don't think there's a hosted Concourse service yet - airplane.ci is coming, but still in beta - and i imagine you'd struggle to get a whole setup on a t2.micro.
Sentry also has self-hosted option available (and it's also opensource).
Instead of GitHub + Travis CI, you can use GitLab (it also has bundled CI capability, based on Docker).
with GitLab, you can also have Continuos Deployment, wired up with the CI solution. The best experience will be deploying to Kubernetes, as it will give you even monitoring, automatically, but you can code custom deployment logic as a step in the CI pipeline.
[ 'GitLab', 'Jenkins', 'Vagrant || OpenShift[.org]', 'Errbit', 'IRCd || ejabberd' ]
Just keep in mind that "self-hosted" means "self-supported". I hope you pay yourself well.Well as part of my current world, sure I do. I have to satisfy the needs of not just dev, but operations, compliance, security, business, the people overseas that i've never met, etc. What I'd really like to see are startups that bootstrap this stuff to think that way prior to growing.
My original point was that this was cool for the dev crowd and perfect for the blog use case, but "world"-class seems hyperbolic. But if you are working for other people: people walking around who have strung together various automation stacks are a dime a dozen -- I've literally seen 4 different takes this month. Execution matters, and execution for your audience matters more.
>> Tools that scale down can also be world-class
We are of the same opinion. I love me some elegant free solutions, and I need to because then I can judge what I'm buying when I need to buy something.
>>Once you get big and purchasing decisions are made far from the front lines I'd argue it gets harder to really have the best tech.
I guess I see where you could be coming from, but it doesn't HAVE TO be that way does it? Isn't the whole point of work to empower yourself to affect the company decision-making. Failing at doing so is sort of, without offending you, you not doing your job. At least that's how I look at it.
[edit: formatting]