vmc non-interactively specifying a “none” url

60 views
Skip to first unread message

Jim

unread,
Apr 2, 2013, 10:29:50 AM4/2/13
to vcap...@cloudfoundry.org
I'm looking to non-interactively push an app with a url of "none"

right now my command looks like:

    vmc push sometestapp -f --framework "standalone" --command "python nowebapp.py" --runtime "python2" --url "none"

but this gives me a 

    FAILED
    CFoundry::UriNotAllowed: 702: External URIs are not enabled for this account error. 

Apologies if this isn't the correct place to ask such a question, I wasn't getting much luck on stackoverflow.

Any help would be appreciated, thanks

Dan Higham

unread,
Apr 2, 2013, 10:37:50 AM4/2/13
to vcap...@cloudfoundry.org
Hi Jim,

Have you tried saving the push settings to a manifest.yml file? You should prompted at the very end to "save the settings", answering yes to this creates a file that you can use again when pushing from the same directory or by specifying a file using the -m switch.

--
Dan Higham 
CloudFoundry Support
@danhigham

Jim

unread,
Apr 2, 2013, 11:01:12 AM4/2/13
to vcap...@cloudfoundry.org
Thanks for the prompt reply. I'm trying to avoid using the manifest.yml file as I can't seem to find a start command located within it so if I tar up the whole directory and send it to someone, I don't think it would work on their machine. Also I wish to create and bind a service on the fly through some bash scripting, which I also don't think is possible through the manifest.yml file. 

Dan Higham

unread,
Apr 2, 2013, 2:43:59 PM4/2/13
to vcap...@cloudfoundry.org
If you deploy it once with the startup command (set the framework to standalone) and the bound service, save the settings and then deploy again it should recreate and bind the service if it doesn't exist.

As for the startup command, if it isn't in the manifest, just add the key 'command', for example;

applications:
- name: sidekiq-dh-worker
  framework: standalone
  runtime: ruby19
  memory: 256M
  instances: 1
  url: none
  path: .
  command: bundle exec sidekiq
  services:
    sidekiq-dh-redis:
      vendor: redis
      version: "2.6"
      tier: free
    sidekiq-dh-mysql:
      vendor: mysql
      version: "5.1"
      tier: free

This is a manifest.yml for a Ruby sidekiq worker, note the 'command' key and also the two named services.

--
Dan Higham 
CloudFoundry Support
@danhigham

Message has been deleted

Jim

unread,
Apr 3, 2013, 2:12:28 PM4/3/13
to vcap...@cloudfoundry.org
Actually I want to try and get this working with a version of vmc that includes the tail command. Here is my manifest.yml file

---
applications:
- path: .
  name: nowebapp
  url: none
  framework: standalone
  runtime: python2
  command: python nowebapp.py
  services:
    samplesvc-d166:
      version: "0.1"
      tier: free
      vendor: samplesvc
  instances: 1
  memory: 64M

now if I simply vmc push this I get a CFoundry::UriNotAllowed: 702: External URIs are not enabled for this account error. Is this some sort of bug where you can't have a "none" url in the manifest file?

Thanks, Jim

Scott Frederick

unread,
Apr 3, 2013, 2:49:39 PM4/3/13
to vcap...@cloudfoundry.org
Jim, 

vmc is interpreting "none" as part of the URL you want to use. You would get the same External URIs are not enabled for this account error if you had "myapp" as the value of the URL field, or if you tried to use a URL like "myapp.mydomain.com" with cloudfoundry.com.

You should be able to have the "url: " key in the manifest.yml file, but leave the value blank. I tried that with a trivial Ruby app, and it worked for me. 

Scott

Dan Higham

unread,
Apr 3, 2013, 3:06:16 PM4/3/13
to vcap...@cloudfoundry.org
Agreed, I think later versions of vmc use a blank instead of 'none'

--
Dan Higham 
CloudFoundry Support
@danhigham

Alex Suraci

unread,
Apr 17, 2013, 2:02:58 PM4/17/13
to vcap...@cloudfoundry.org
Hi,

What version of VMC are you running?

The latest version supports '--domain none' (url was split into host/domain for supporting v2 apis).

You may want to try upgrading and specifying this in your manifest for your app:

    domain: none

This would replace 'url' in your manifest. Note that both 'none' and the empty string are both accepted, but 'none' looks better when using the flags.

Alex
Reply all
Reply to author
Forward
0 new messages