
Show HN: “Install on DigitalOcean” button for open source apps - timmorgan
https://github.com/seven1m/do-install-button
======
timmorgan
Hey everybody. I built this small Sinatra app because I wanted a simpler way
for people to install my software OneBody[1] on DigitalOcean.

I'm not sure my little VPS will hold up under the strain of HN, but you can
see the app in action at [http://installer.71m.us](http://installer.71m.us)
and even use it to install itself (how meta!) on DigitalOcean.

This uses the new MetaData[2] feature of the DO API to pass a config string to
be processed by CloudConfig[3].

Once that is done, there is a small bit of code running on the VM to tell this
app when the install is finished so you get a progress bar while you're
waiting.

To be clear, DigitalOcean is doing all the real work -- this app simply acts
as a hand-off between your app.yml config file on GitHub and the DigitalOcean
API.

[1] [https://github.com/churchio/onebody](https://github.com/churchio/onebody)

[2] [https://www.digitalocean.com/community/tutorials/an-
introduc...](https://www.digitalocean.com/community/tutorials/an-introduction-
to-droplet-metadata)

[3] [https://www.digitalocean.com/community/tutorials/an-
introduc...](https://www.digitalocean.com/community/tutorials/an-introduction-
to-cloud-config-scripting)

~~~
jaequery
Hi! So I clicked on Deploy to DO button, I now have a VM up and running.

But now what? I can't even SSH into it as I don't have the pw. I hit port 80
and all I get is the same "install it on DO page".

I thought it'd do a 1 click deployment, I'm stumped :(

~~~
timmorgan
If you have an ssh key set up in your DigitalOcean account, then that is the
key set up on the root account. If not, you should have received a password
email from DigitalOcean -- use that.

    
    
        ssh root@the-ip

~~~
jaequery
thanks i got in ssh.

but as for the app, I hit the IP and i just see the "DO Install Button" page.
[http://cl.ly/image/032E0s0S122I](http://cl.ly/image/032E0s0S122I)

is this expected?

thx for the awesome work btw, i am just so anxious to try it out, atleast for
one of the church i know who could def use something like this.

~~~
timmorgan
You might be more interested in installing our church app OneBody. You can do
that by clicking the "Install on DigitalOcean" button in the readme here:
[https://github.com/churchio/onebody](https://github.com/churchio/onebody)

------
andrewsomething
Love it! This is the exact type of thing that we hoped would come from
providing the MetaData service.

Please submit it to our projects page so we can highlight it:

[https://www.digitalocean.com/community/projects](https://www.digitalocean.com/community/projects)

------
swanson
I'd be interested in adding this button once it gets offical support from
DigitalOcean.

I added the Heroku Button[1] to a self-hosted OS app I wrote[2] and it seems
to be useful (over 100 "recent deploys" per Heroku). It would be great if
there was some affiliate commission as well - if someone signs up for a VPS to
run an app, would be awesome to get a small kickback from DigitalOcean.

[1]: [https://buttons.heroku.com/](https://buttons.heroku.com/)

[2]:
[https://github.com/swanson/stringer](https://github.com/swanson/stringer)

~~~
timmorgan
Matt, thanks for the feedback!

I'm not sure _this_ app would get official support from DO, since it's a bit
hacky. I imagine DO would add their own install-button support at some point
in the future (at least I hope so).

This app _does_ set a referral cookie whenever someone chooses to install an
app using it.

~~~
RubyPinch
that is referral for the hoster of the button, not the project installed via
the button, correct?

~~~
timmorgan
Yes.

------
gohrt
_Something Something_ WebIntents.

Why is "DigitalOcean" a choice made by the app, instead of by the user? Can
there be a standard for this sort of installation metadata?

~~~
timmorgan
There _could_ be a standard, but I don't think it exists today (at least not
one that is supported by the services I hope to use, e.g. DigitalOcean,
Amazon, Google).

This is a tool that scratches my own itch -- certainly not something I care to
be the end-all of service-agnostic app installer.

~~~
billions
Soon each person will have a computer in the cloud. There is no reason why
apps shouldn't be as easy to install on any user-provided server as on
desktops. I am very excited about this and would be interested helping code
it.

~~~
wmf
I think [https://sandstorm.io/](https://sandstorm.io/) is the leading project
in this area.

------
diminoten
How are you planning on handling support for this going forward?

I have no specific need, I'm just always curious about how folks transition
from, "I have a neat idea" to "I want my neat idea to work for most people".

------
doczoidberg
same button for azure: [http://www.bradygaster.com/post/the-deploy-to-azure-
button](http://www.bradygaster.com/post/the-deploy-to-azure-button)

~~~
akavel
Upvoting, in part because as much as I don't understand why an open-source
project would want to advertise a particular vendor, if one insists on
Facilitating Deployment (while doing unpaid advertising), one should probably
take effort to facilitate this deployment to as many vendors as possible. Thus
Azure and Heroku too (linked in your comment to comment) if it's possible in
similar way, and maybe there are more too.

edit: ah, I see from other comment that there's apparently possibility of
gaining some "cash" from DO for the ads:
[https://www.digitalocean.com/referral-
program/](https://www.digitalocean.com/referral-program/) although seems only
useful if one's using the DO platform himself (works as a discount).

------
level09
I have written something similar, it deploys Enferno (enferno.io) a flask
based app on ubuntu (not necessarily digital ocean)

it's an ansible playbook that configures the server and installs all
requirements, and sets up nginx, python for you.

whoever is interested, here is the source code:

[https://github.com/level09/enferno-
ansible](https://github.com/level09/enferno-ansible)

------
hunvreus
Very neat. We did something very similar with the devo.ps button, allowing you
to define configurable settings: [http://devo.ps/blog/deploy-your-meteor-apps-
on-digital-ocean...](http://devo.ps/blog/deploy-your-meteor-apps-on-digital-
ocean-in-5-minutes/)

We have yet to properly document the feature, but we've used it in a few
places already.

------
thisismitch
Great use of OAuth, API, and user data!

------
bhhaskin
I like the idea, but runcmd could be dangerous as well as setting sudo
permissions.

~~~
jerf
It's _installing a brand new VM_. By definition, it's got more than just root,
it's got enough permissions to bring up new VMs entirely. Being worried about
whether it has sudo permissions or something inside the VM is beside the point
once you've stipulated that.

------
mbertrand
This is very cool, nice work!

------
acron0
Will definitely use :)

------
phalgun_g
This is quite cool.

------
Blaine0002
This is pretty exactly what I use fabfiles for.

------
zwischenzug
Why not just use docker for this? Then you can install anywhere that has
docker.

~~~
acron0
This response annoys me a little bit. "Why not just use docker?" gets thrown
around so much at the moment, as if Docker is the alpha and omega of app
deployment. Is it just me? Docker's awesome. I love Docker. But it's not the
Messiah of app deployment. Not that DO is, but that's not the point.

~~~
Gigablah
You could treat a $5 DO instance as a big "container" in itself :)

------
alex_chang
I'd definitely fund a company based around this.

~~~
driverdan
Based around what, one click VPS/PAAS deploys? There are a lot of tools out
there that can do this. Vagrant with a bash script is the simplest that comes
to mind.

~~~
alex_chang
You'd probably be able to create a marketplace around these types of services
which wraps monitoring/uptime/alerting/management/autoscaling/software updates
etc into one interface.

~~~
manacit
You're looking for Bitnami: [https://bitnami.com](https://bitnami.com)

~~~
ridruejo
Yes :) We support AWS, Google, Amazon as well as local development. A bunch
more coming soon

------
nodata
Does this kind of go against the spirit of open source?

~~~
timmorgan
For OneBody, we have 6 different ways to install the software.[1] We're
definitely not forcing anyone to pay DigitalOcean to host our open source app,
but it sure is nice to give people that option when they don't want to mess
with running their own host.

[1]
[https://github.com/churchio/onebody/wiki/Installation](https://github.com/churchio/onebody/wiki/Installation)

~~~
gohrt
Why is "church" (specifically) built into the onebody product? The software
would seem to be organization-agnostic, suitable for any community group.
"Church" is certainly a reasonable target/majority use case for marketing, but
it seems strange to exclude other cases where a group of people come together
in a buildng, take classes, plan events, etc, where the software could work
fine.

~~~
timmorgan
I agree somewhat, though OneBody does have church-specific features built-in,
such as _favorite bible verses_ and _prayer requests_ etc. It is specialized
for church communities, though you can turn that stuff off and use the
software as a general community social network if you want.

