How do I use OpenStack and Keystone with juju?

Solution 1:

I think this is basically answered here:

How can I configure multiple deployment environments for juju?

You just need to explicitly set the right keys in environments.yaml, specifically ec2-uri, s3-uri, access-key, default-image-id and secret-key.

Your keystone bits should be producing the access key ID and secret key that will be used to populate those fields.

Solution 2:

Your environments.yaml is basically the same as it was without keystone. The only difference is where you're getting your access-key and secret-key from. Using the deprecated auth system, the 'nova-manage project zipfile' spat out a zip archive that contained all of this per project. Now, you need to create the EC2 credentials in keystone for specific user:

keystone-manage credentials add somekeystoneuser EC2 heraccesskey hersecretkey

These get set in the environments.yaml as usual:

juju: environments
  openstack:
    type: ec2
    control-bucket: openstack-bucket
    admin-secret: fooooooo
    access-key: heraccesskey
    secret-key: hersecretkey
    ec2-uri:  http://nova.api.server:8773/services/Cloud
    s3-uri: http://nova.api.server:3333
    ec2-key-name: keypairname
    default-image-id: ami-00000004
    default-series: precise