How do you deploy your software?
Did you set up continuous integration and continuous delivery from the start?
When starting my own projects I find that it's a time-consuming process to set up automation and a deployment pipeline early on when I just want to play around with an idea. I'm thinking of building a tool that automatically configures the operations aspect of software products so that I can quickly start things while still following development best practices.
#idea-validation
I deploy https://soccer.coachaide.com via Dokku (i.e. git push) and it runs on 2GB RAM VPS at OVH for ~$3/month. Like others have said, beware of the cost increases with "free to start" platforms like Heroku. For me, setting up Dokku has been an absolute breeze. I can reconfigure everything in less than 15 mins.
Love it! Thanks for the reply
Setting up CI/CD when the goal is to "play around" with an idea is premature optimization. There are a fair amount of services that allow quick deployments: Heroku, GCP, Azure, Zeit.
Thanks for the reply. That's a fair point. New ideas definitely don't warrant the work of configuring a whole pipeline.
Would you still consider it to be a premature optimization if it required no work and was just the default state?
I currently am using firebase, which is basically GCP, and has the one line command line deploy. But I find that I would like it more if I had a dev environment and deploys were automatically triggered off of commits to master.
This is the default mode of deploying with Heroku. You can also configure a git deployment pipeline on your own server.
I will have to check it out more!
For the couple of people that are working on our code base, Azure's deployment slots is plenty. We have three: development, staging, and production and we align our code base to each where the development environment is a sandbox that's not bundled/minified, and staging is a pretty close replica of production but pointing to a staging db.
.NET core makes good use of environment variables to make the dev/staging/prod deployments one-click, then swap the slots when you feel like staging is fully vetted.
That's awesome! I haven't played around with Azure very much. It seems to be a typical deployment pipeline with blue/green deployments.
How was the process of getting it set up the first time?
Really it's starting your app using environment variables from the get go to accurately target what gets released to dev/staging/prod when you deploy. Then making sure your bundling/minifying is working correctly during release. There is almost no work on the azure side, only setting up the environment variables in each slot. Everything else just works.
"Just works" is so great.
Thank you for the input :)
Very carefully ;)
I use CD + dokku typically from the start to deploy things from a git repo to a server somewhere. It's one of those things where a small amount of pain saves a lot of time in short order.
I completely agree! Automating as much as possible from the start is so nice.
This is my first time hearing of dokku. Do you deploy that to your own server or on a cloud vm?
Well I have a cloud VPS. So I had to set it up and do some things by hand but now it basically works like Heroku. Most apps can run on a simple VPS and you can just keep upgrading it until you hit a real wall, at which point you probably have revenue and stuff..
I just use Gitlab CI/CD. It's free, easy and quick to set up. It's also integrated into their source control and task management tools!
I checked out Gitlab based on another comment, it's really cool! I didn't realize that it had so many features.
What do you have it configured to deploy to? AWS, Heroku, your own server?
I still have one old project on AWS and another on Heroku, but I've moved almost everything over to Digital Ocean over the past 14 months.
It's just a better UI (at least for me) and more for the money. Until very recently, I was running all of Alchemist Camp plus four other sites off a single $5/month droplet.
Check out https://getcleaver.com/ - it's free to use!
Thanks for the recommendation! I'm on a linux machine right now and I can't install the .appimage file. I've never seen that file type before so I'm not sure what to do.
I see from your profile you're a collaborator on this tool. How does it work? Is it just a desktop app that calls cloud APIs? Does cleaver host it's own servers?
Yup - it's a desktop app and you connect to a cloud server. Here is some documentation https://github.com/getcleaver/docs/tree/master/3 Servers . I'm not sure about the .appimage file; I sent a note to the creator to see if he might have an idea - which I'll relay back.
Thanks!
Yep, I use a self-hosted Gitlab CI and deploy to Heroku when pushing to master. Don't need to spend time since I use the same configuration for all my projects.
Wow, I didn't realize that gitlab packed all of those features in it. I will have to check it out more. Thank you!
I use digital ocean. I took a short course on kubernetes but decided it was too much, and just went with lxd/lxc, but I want to try docker soon for easier container config.
I don't use ci/cd because I don't write any tests for ideas I'm testing with, just pull code when I think it's ready. I've finally started writing code so the dev/prod configs are handled with environment variables, which has helped a lot.
I want to try a serverless-ish framework (OpenFaaS seems like it'd be a cool start), where I can just configure domains/endpoints, do a little more git work so there's a release branch, and have stuff auto-update and auto-run.
I've found, for me at least, using containers, in general, is too much to work when there are so many cloud providers now where you can just drop a node.js app in and it just works. Any specific reason you choose to set up containers?
I hear you on not writing tests early on. Environment variables are super helpful.
Have you ever tried using firebase? It's really easy to get started with cloud functions on there. They have a really good free tier to get started and basically provide everything except servers. But you can do that on AppEngine on Google Cloud.
I love firebase and find it to be really easy to use. The one thing I don't like is that it was built mainly for mobile native apps so there isn't really a concept of dev and prod environments. I think it's because native apps are released through an app store so environment aren't as big of a deal for them.
There are a few factors:
Yeah, I should've been using env a long time ago haha. So much time wasted making sure not to pull files that have hard-coded values!
I like the idea of serverless endpoints so I can scale things a bit more easily. It'd be so much fun to just configure domains / urls to point to a git repo or container + config and have it start running :)
You make some great points.
The key to the cloud is to only use what you need. In the most ideal scenario, all of your instances would always be running at 80% resource usage with proper autoscaling. Serverless attempts to solve this but can have problems with cold starts. Any time an environment isn't in use it should be torn down. Raw VMs are going to be the cheapest overall for performance but require the most configuration work.
I like your point about being wary of non-OSS things. Serverless is a great tool but each platform requires you use their own sdk (firebase -> firebase-admin, aws lambda -> boto3, etc). It is a shame. I see standards arising for these in the future though. If not on the cloud providers own account, through open source infrastructure.
Netlify and Zeit's now both make it super easy to set up deployment where you just add a domain and point to a git repo. However, they only provide static file hosting and lambdas at the moment.
Yeah, you're definitely right on all counts. And the OSS-only thing definitely limits options, so it's good to take it as a desire, not a hard requirement.
Seeing this yesterday inspired me to try OpenFaaS. I was going to try fnproject before, but openfaas has an option to run entire apps (rails, django, etc) as an endpoint.
For now, my goal is to start writing code in a more serverless fashion - keep them self-contained, small-ish, and easy to spin up. Running something like openfaas on digital ocean isn't going to magically keep resource usage under control, but seems like a good step while more cloud providers make it easier to automate very fast deployments.
Also, none of my apps have required more than a $10/mo server, so I'm not at the point of needed auto-scaling yet. Just want to make it super easy to deploy a new idea, and then scaling easier if I ever hit on a great idea :)
What do y’all use for APIs? Heroku wasn’t working well for me last night
I really like Google Cloud. AppEngine is good for REST servers. Cloud functions both in Google Cloud and in Firebase are really easy to set up as well.
Agreed with Caleb. If I'm just trying to MVP / build out a quick proof of concept, I'll just throw it on Heroku and be done with it.
This comment was deleted 7 years ago
I played around with that a little bit. It's very similar to Google's AppEngine. Do you have it hooked up to autodeploy from your repository?
This comment was deleted 7 years ago
Yeah! I'm trying to set up an automated thing that sets up automated pipelines that triggers a deploy when there is a push to git. Deploying from the command line is easy enough but full automation is a different world :)
This comment was deleted 7 years ago