2

I have an application in Openshift free plan with only one gear. I want to change it to scalabe and take usage of all of 3 free gears.

I read this blog post from openshift and I found that there is a way to do it. I should clone my current application to a new one as a scalable which will use the 2 remaining gears and then I will delete the original application. Thus, the new one will have 3 free gears.

The way that blog suggest is: rhc create-app <clone> --from-app <existing> --scaling

I have the following error: invalid option --from-app

Update

After running the command gem update rhc, I don't have the error above but...A new application with the given name has created with the same starting package (Python 2.7) just like the existing one, but all the files are missing. It actually create a blank application and not a clone of the existing.

Update 2

Here is the structure of the folder:

-.git
-.openshift
-wsgi
---static
---views
---application
---main.py
-requirements.txt
-setup.py
timo.rieber
  • 3,727
  • 3
  • 32
  • 47
Tasos
  • 7,325
  • 18
  • 83
  • 176

3 Answers3

2

From what we've talked on IRC, your problem was around missing SSH configuration on Windows machine:

Creating application xxx ... done
Waiting for your DNS name to be available ...done
Setting deployment configuration ... done
No system SSH available. Please use the --ssh option to specify the path to your SSH executable, or install SSH.

I've double checked it, and it appears to be working without any problem. The only requirement is to have the latest rhc client and putty or any other SSH client. I'd recommend going through this tutorial once again and double-check everything to make sure everything is working properly.

Jeyanthan I
  • 1,611
  • 15
  • 28
soltysh
  • 1,464
  • 12
  • 23
  • I have done the above procedure again and I had in ssh command in Putty the following: "Server refused our key". I have also add the Putty in Path just for case – Tasos Jul 10 '14 at 14:20
  • Anastasios did you google for that problem? There seems to be an error during your setup procedure. Have a looked [here](http://superuser.com/questions/671077/how-to-use-ssh-public-key-with-putty-to-connect-to-a-linux-machine), [here](https://www.digitalocean.com/community/questions/putty-ssh-server-refused-our-key) or [here](http://www.walkernews.net/2009/03/22/how-to-fix-server-refused-our-key-error-that-caused-by-putty-generated-rsa-public-key/). – soltysh Jul 14 '14 at 18:43
  • 1
    I remove all the indepentants programs and made a clean install. The problem was on ssh. I don't know what exactly, but now it works :) – Tasos Jul 18 '14 at 07:53
0

Make sure you are using the newest version of the rhc gem with "gem update rhc" to make sure that you have access to that feature from the command line.

  • You are right. After running the commant, I don't have the same error. It creates a new scalable application but it isn't a clone of the previous one. It is a blank application using the same starting package (Python 2.7). All the files are missing – Tasos Jul 09 '14 at 13:49
  • What version of rhc are you using? use rhc --version to get that –  Jul 09 '14 at 19:57
  • rhc 1.26.9. It should be the latest since I have run the update with success – Tasos Jul 09 '14 at 22:04
0

The --from-app will essentially do a 'rhc snapshot save & snapshot restore` (amoung other things) as you can see here from the source:

  if from_app
    say "Setting deployment configuration ... "
    rest_app.configure({:auto_deploy => from_app.auto_deploy, :keep_deployments => from_app.keep_deployments , :deployment_branch => from_app.deployment_branch, :deployment_type => from_app.deployment_type})
    success 'done'

    snapshot_filename = temporary_snapshot_filename(from_app.name)
    save_snapshot(from_app, snapshot_filename)
    restore_snapshot(rest_app, snapshot_filename)
    File.delete(snapshot_filename) if File.exist?(snapshot_filename)

    paragraph { warn "The application '#{from_app.name}' has aliases set which were not copied. Please configure the aliases of your new application manually." } unless from_app.aliases.empty?
  end

However this will not copy over anything in your $OPENSHIFT_DATA_DIR directory so if you're storing files there, you'll need to copy them over manually.

niharvey
  • 2,807
  • 2
  • 15
  • 24
  • I have updated the question with the structure of the folder. Shouldn't clone the whole app in my case? – Tasos Jul 09 '14 at 16:08