2

I was wondering if anyone knows of a way to deploy to Rackspace Cloud Sites via Git-push?

I contacted the Rackspace support and all they can tell me is that I might be able to as long as I don't need root access. Is that something that's possible?

I can't seem to find anything on Google, but I thought I would at least double check, as i'm only familiar with pushing to GitHub & Heroku.

SkinnyGeek1010
  • 446
  • 5
  • 16

2 Answers2

2

Rackspace cloud sites doesn't allow git upload, only FTP upload is allowed.

Tutul
  • 892
  • 6
  • 20
  • 1
    Correct. (SFTP is supported too) The other answers are confusing Cloud Sites and Cloud Servers. If you want to push via Git to a PaaS, you could try something like Appharbor. – CoreyH May 02 '12 at 17:15
  • I looked into Appharbor and it seems to only do .net apps. Has anyone used www.deployhq.com ? That is the only deploy specific PaaS I can find on Google. Any others I should check out? – SkinnyGeek1010 May 03 '12 at 22:22
  • You could make it part of your post-recieve hook in git to upload via SFTP then. Allowing you to "deploy via git push". I use this method for my blog. http://git-scm.com/book/ch7-3.html – Joseph Kern May 09 '12 at 18:51
0

I am assuming you have git installed on your instance.

On the server create a repo for a server with "--bare"

[server:~/]$ mkdir app.git
[server:~/]$ cd app.git
[server:~/app.git]$ git init --bare

On the client clone, commit, and push:

[client:~/]$ git clone ssh://<username>@<servername>/~/app.git app
[client:~/]$ cd app
[client:~/app]$ touch readme.rst
[client:~/app]$ git add readme.rst
[client:~/app]$ git commit -am"Initial commit" 
[client:~/app]$ git push origin master

Now your code has been pushed to the server. What you can do from here is up to you.

Additional note: git is a distributed version control system, which means there is little difference between a "client" and a "server". In this case, there is no extra service running on your server, you only need ssh access, git does the rest.

Joseph Kern
  • 9,899
  • 4
  • 32
  • 56