Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

HP Cloud has a new cloud service out based on Open Stack. How can I configure my environments.yaml to connect to the new service?

share|improve this question
add comment

2 Answers

up vote 7 down vote accepted

You should start by generating a generic configuration file for Juju, using the command:

juju generate-config -w

This will generate a file, environments.yaml, which will live in your ~/.juju/ directory (and will create the directory if it doesn't already exist).

The essential configuration sections for HPCloud look like this:

  hpcloud:
        type: openstack
        admin-secret: 6638bebf0c54ffff1007e0247d4dae98
        control-bucket: juju-bc66a4a4adbee50b2ceeee70436528e5
        tenant-name: "juju-project1"
        auth-url: https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0
        default-image-id: "81078"
        default-instance-type: "standard.xsmall"
        auth-mode: userpass
        username: "xxxyour-hpcloud-usernamexxx"
        password: "xxxpasswordxxx"
        region: az-1.region-a.geo-1
        public-bucket-url: https://region-a.geo-1.objects.hpcloudsvc.com/v1/60502529753910

The items highlighted are values you will need to enter, and are explained below. You will find most of the relevant information on the HP Cloud API Keys page

  • tenant-name: For HP Cloud, this is listed as the project name from the Project's Page on the HP Cloud console. Ensure you put in the project's name (the string), and not the project number as that won't work.

enter image description here

  • auth-url: This is the keystone url for authentication. It is given (on a region by region basis) under the heading "Service Endpoints - identity"

auth

  • region: This is the longer format region name, given under the headings for Block Storage and Compute sections.

region

  • default-image-id: This is the number assigned to the images available to the HP Cloud. Currently, these may vary from region to region. The best way to ensure that you have the correct image id is to go to the HP Cloud Console > Servers page and Click on the link to "Create a new server from an image". This will display a list of available images. In the "partner provided images" section you should find a relevant version of Ubuntu. The number in brackets after the image description is the id number you require.

image number

Official docs:

share|improve this answer
1  
Make sure you're not using ppa:juju/devel. The public-bucket on HP Cloud doesn't have images that correspond to the version of juju the ppa provides. So you can't even bootstrap an instance. It took me quite awhile to figure out what was going wrong. –  andrewsomething Aug 4 '13 at 18:36
add comment

You will also need to set your access-key and secret-key information as an environment variable or in the environments.yaml file.

Adding to your environments.yaml file should make it look like this:

environments:
  hpcloud:
    juju-origin: ppa
    control-bucket: juju-hpc-az1-cb
    admin-secret: [any-unique-string-shared-among-admins-u-like]
    default-image-id: [8419]
    region: az-1.region-a.geo-1
    project-name: [your@hpcloud.com-tenant-name]
    default-instance-type: standard.small
    auth-url: https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/
    auth-mode: keypair
    type: openstack
    default-series: precise
    authorized-keys: [CONTENTS (not path) to your ~/.ssh/id_rsa.pub key]
    access-key: [PUT YOUR ACCESS-KEY HERE] 
    secret-key: [PUT YOUR SECRET-KEY HERE]'

You can find the access-key and secret-key by logging into your HP cloud control panel and displaying your API keys.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.