Migrating From Digital Ocean to Heroku - heroku

I have an app that uses Flash, MariaDB, and Python which I currently host on Digital Ocean. I am planning to move to Heroku for scalability purposes, but I am unable to find any resources online talking about the process of migrating data from Digital Ocean to Heroku. Can anyone explain the process? Thanks

Heroku provides Dynos (application runtime) and Add-Ons (databases and other tools).
First create a Dyno (it can also be free) and deploy your Python application (you can push the code from Git or create a Docker image for the Heroku Docker Registry).
Then enable the MariaDB add-on to setup your storage (there is a free plan here too, check if this is suitable in your case).
You need to provide the MariaDB connection string as environment variable, this is explained here
Finally it is a good idea to use Config Vars for all environment variables that your application might need (ie tokens, secrets).

Related

Solaris 11 development environment on Cloud or hosting

I got in charge to create a website based on Java. Production environment specs include Solaris 11.1, OHS 12.1.3, WebLogic 12.1.3, Java 1.7.0_51 and Oracle Database 11.2.
I want to create a server on some cloud or hosting service as Development environment with the same specs to avoid migration problems to Production. I also think this approach helps to give my team a single server where they can work and have some testers/client to visit the site.
Normally I would use a local Development environment but a lot of people is involved and differences with Production can become a problem at migration.
I checked http://www.polarhome.com/ but I don't know if it will fit all specs needed. I looked at Windows Azure and Google Cloud with no success. AWS maybe? I also checked https://cloud.oracle.com but I don't understand if they already offer what I need.
Do you know any providers to create my Development environment or another approach/suggestion to develop this project??
Thanks!
EDIT.
To clarify, the client's Production environment already exists and is running somewhere. My project will be installed on that environment when development is finished. I personally think that developing on any VM with WebLogic 12.1.X and Oracle Database 11.X should be enough, but I've never done it so I wanted to follow client's advise on having a Development environment similar to Production.
Do you think I can just create a VM on any OS and just install WebLogic 12 with Oracle Database 11?? Any suggestions to avoid migration issues if I take that route?
I think that develop a new website from scratch thinking to use the architecture proposed by you is a nonsense. I think that if you will use cloud services like PaaS you will do something better.
In any case, you can find solaris VMs on Cloudsigma , Entic and Oracle Public Cloud

Where are my application files after deploy to google compute engine?

I'm following the tutorial to deploy a ruby app to google compute engine. Everything works, however I now want to ssh into the app to run migrations etc. After some searching i was able to find my files under a docker instance here /var/lib/docker/aufs/diff/e2972171505a931749490e13d21e4f8c0bb076245ef4b592aff6667c45b2dd13/app
Is there a simpler way to access my files? perhaps a symlinked folder?
Ruby apps on Google AppEngine run via Docker. Because AppEngine is a PaaS provider, it's discouraged (though possible) to run commands on production machines. If you'd like to run database migrations, please run them locally and point your configuration at your production database.

Deploy go app to docker in vagrant

Now i'm working on RESTfull API on go, using Windows and goclipse.
Testing environemnt consists of few VMs managed by Vagrant. These machines contain nginx, PostgreSQL etc. The app should be deployed into Docker on the separated VM.
There is no problem to deploy app on first time using guide like here: https://blog.golang.org/docker. I've read a lot of information and guides but still totally confused how to automate deploying process and update go app in docker after some changes in code done. On the current stage changes in code done very often, so deploying should be fast.
Could you please advise me with correct way to setup some kind of local CI for such case? What approach will be better?
Thanks a lot.

How to run InfluxDB on Heroku?

Is it possible, and if so, how? I'd like to be able to reach it from my existing Heroku infrastructure.
Will I need a Procfile? From what I understand it's just a standalone binary written in Go! so it shouldn't be that hard to deploy it, I'm just curious how to deploy it because I don't think I understand the ins and outs of Heroku deployment.
Heroku Dynos should not be used to deploy a database application like InfluxDB.
Dynos are ephemeral servers. Data does not persist between dyno restarts and cannot be shared with other dynos. Practically speaking, any database application deployed on a dyno is essentially useless. This is why databases on Heroku (e.g. Postgres) are all Add-ons. InfluxDB should be set up on a different platform (like, AWS EC2 or a VPS) since a Heroku Add-on is not available.
That said, it is possible to deploy InfluxDB to a Heroku dyno.
To get started, it is important to understand the concept of a 'slug'. Slugs are containers (similar to a Docker images) which hold everything needed to run a program on Heroku's infrastructure. To deploy InfluxDB, an InfluxDB slug needs to be created.* There are two ways to create a slug for Go libraries:
Create a slug directly from a Go executable as described here.**
Build the slug from source using the Heroku Go buildpack (explained below).
To build the slug from source using a buildpack, first clone the InfluxDB Github repo. Then add a Procfile at the root of the repo, which tells Heroku the command to run when the dyno starts up.
echo 'web: ./influxd' > Procfile
The Go buildpack requires all dependencies be included in the directory. Use the godep dependency tool to vendor all dependencies into the directory.
go get github.com/tools/godep
godep save
Next, commit the changes made above to the git repo.
git add -A .
git commit -m dependencies
Finally, create a new app and tell it to compile with the Go buildpack.
heroku create -b https://github.com/kr/heroku-buildpack-go.git
git push heroku master
heroku open // Open the newly created InfluxDB instance in the browser.
Heroku will show an error page. An error will be displayed because Heroku's 'web' process type requires an app to listen for incoming requests on the port described by the $PORT environment variable, otherwise it will kill the dyno. InfluxDB's API and admin panel run on ports 8086 and 8083, respectively.
Unfortunately, InfluxDB does not allow those ports to be set from environment variables, only through the config file (/etc/config.toml). A small bash script executed before InfluxDB starts up could set the correct port in the config file before InfluxDB starts up.
Another problem, Heroku only exposes one port per dyno so the API and the admin panel cannot be exposed to the internet at the same time. A smart reverse proxy could work around that issue using Heroku's X-Forwarded-Port request header.
Bottom line, do not use Heroku dynos to run InfluxDB.
* This means the benefits of a standalone Go executable are lost when deploying to Heroku, since it needs to be recompiled for Heroku's stack.
** Creating a slug directly from the InfluxDB executable does not work because there is no built-in way to listen to the right port given by Heroku in the $PORT environment variable.
I like to think anything is possible on a Heroku node when using a custom buildpack, but there are some considerations when hosting with Heroku:
ops, e.g. backup, monitoring (does it entail installing extra services, opening extra ports, etc - Heroku might get in the way here)
performance, considering dyno size
and if you need a larger dyno, cost becomes an issue. You'll get more bang for your buck when you go the IaaS route.
other "features" of a dyno, e.g. disk ephemerality
I highly recommend hosted InfluxDB or spinning up your own on a VPS, all of which you can point your existing Heroku-based apps to. It will then help to get those instances as close together as possible (i.e. same region, or co-located if possible), presuming a need for low latency between DB and app stack.

Where to host Meteor-Apps?

I want to build a Meteor-App to run a little side-project/business. This in mind:
I want a cheap environment (online) to test and share my progress
I want to have the option to scale it up in terms of production in a few months
I want to use some standard command line tools to push to this service
The database options have also to scale up if i need more
I've started looking into Heroku, but are there any "good practices" which anybody can recommend? I never hosted a Meteor-App, and i want to avoid a private server because of administration etc.
Meteor apps are immediately ready to deploy to Heroku. Your question is very broad, but Heroku fits the bill for every parameter you specified.
Here's a flow for creating an example meteor app and deploying it:
$ meteor create --example leaderboard
$ cd leaderboard
$ git init . && git add .
$ git commit -m "First commit"
$ heroku create --buildpack https://github.com/jordansissel/heroku-buildpack-meteor
$ git push heroku master
There are a few options:
Meteor.Com -- the easiest option, free hosting from Meteor. Super easy deployments, but limited resources until the Galaxy platform is complete. Not suitable for very high load/traffic sites (yet).
PaaS providers -- cloud hosting where you are responsible for your app, and the provider manages the infrastructure for you. Generally small virtual machines which host node apps, with great deployment tools.
Own Infrastructure -- info on how to host on your own servers, or via IaaS providers like Amazon AWS, Digital Ocean, Rackspace, etc. Most complicated option.
Deployment Services - services to manage deployment to your own servers (or IaaS servers). Advantages of the above but with the management taken care of for you (managed deployment, monitoring, etc).
Source: Meteorpedia
I have been hosting some meteor apps on Webfactions and it has been working fine so far.
Here is a tutorial :
http://racingtadpole.com/blog/meteor-mongodb-webfaction/

Resources