We should ship a boilerplate environments.yaml.

Bug #993616 reported by Jorge Castro
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Ian Booth
pyjuju
Triaged
Low
Unassigned

Bug Description

Rick Spencer had a great idea, on the first juju bootstrap we should have a skeleton environments.yaml with examples commented out, with local as default, and include examples for EC2 and openstack.

We want to make it so people can just uncomment a few lines and get started. Also remember to include a link to the documentation in the comments.

Jorge Castro (jorge)
Changed in juju:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

+1 from me, great idea. The sample environments.yaml is not very functional right now, but at least w/ local we could do something when they do bootstrap the first time.

Revision history for this message
Peter Petrakis (peter-petrakis) wrote :

Encountered this indirectly from issue:
https://bugs.launchpad.net/juju/+bug/1052088

If it wasn't for the debug logs, I'd have no idea what valid values are
for juju-origin.

It also appears that when you're doing an LXC deploy, only a subset
of variables is necessary like admin-secret, but not control-bucket (vice vera?).

This is really just standard UNIX convention, there ought to be an
annotated config file that describes everything, and in what context
that they're valid in. A man page would nice too, also standard
convention.

Maybe we can generate these from the unit tests? That would streamline
maintenance as these annotated config files have a habit of falling behind.

Martin Packman (gz)
Changed in juju-core:
importance: Undecided → High
status: New → Confirmed
Changed in juju-core:
milestone: none → 2.0
Changed in juju-core:
status: Confirmed → Triaged
Revision history for this message
Jorge Castro (jorge) wrote :

Hi Dave, I've been collecting stanzas for different juju configs from around the community for working examples, let me know if you need me to provide them to you.

Revision history for this message
Mark Ramm (mark-ramm) wrote :

Jorge, could you add them to the ticket? I'm going to put this in the backlog for somebody to work on when they have a little free time, and it would be good if it's ready to start work as soon as somebody gets to it.

Revision history for this message
Jorge Castro (jorge) wrote :

## This is the Juju config file, in there you can specify multiple environments to deploy into, by default we ship local (default), AWS, HP Cloud, OpenStack, and MAAS
## See http://juju.ubuntu.com/docs for more information

default: local
environments:

## https://juju.ubuntu.com/get-started/local/
  local:
    type: local
    control-bucket: juju-a14dfae3830142d9ac23c499395c2785999
    admin-secret: some made up number
    default-series: precise
    juju-origin: ppa
    data-dir: /home/jorge/juju-data <--- recommend setting a sane XDG default for the user

## https://juju.ubuntu.com/get-started/amazon/
  amazon:
   type: ec2
   control-bucket: juju-some-randomnumbers
   admin-secret: blah blah blah
   default-series: precise
   ssl-hostname-verification: true

## https://juju.ubuntu.com/get-started/hp-cloud/
  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: [<email address hidden>]
    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]

## https://juju.ubuntu.com/get-started/openstack/
  openstack:
    type: openstack_s3
    control-bucket: <user specific>
    admin-secret: <user specific>
    auth-url: https://yourkeystoneurl:443/v2.0/
    default-series: precise
    juju-origin: ppa
    ssl-hostname-verification: True
    default-image-id: bb636e4f-79d7-4d6b-b13b-c7d53419fd5a
    default-instance-type: m1.small

## https://juju.ubuntu.com/get-started/maas/
(I don't have one for MAAS)

Revision history for this message
Jorge Castro (jorge) wrote :

We'll probably want to add in some commented out parts for common stanza snippets , I also think it's important to ensure that we have links to the individual doc sections for reference material.

Revision history for this message
Jorge Castro (jorge) wrote :

For MAAS

## https://maas.ubuntu.com/docs/juju-quick-start.html#your-api-key-ssh-key-and-environments-yaml

  maas:
    type: maas
    maas-server: 'http://localhost:5240'
    maas-oauth: '${maas-api-key}'
    admin-secret: 'nothing'

Revision history for this message
Antonio Rosales (arosales) wrote :

## hpcloud:

"authorized-keys-path: /path/to/your/ssh/key" needed to be added to the stanza in order to get ssh properly working on ssh.

-Thanks,
Antonio

Revision history for this message
Antonio Rosales (arosales) wrote :

---correction---
re comment #8 it should read:

## hpcloud:

"authorized-keys-path: /path/to/your/ssh/key" needed to be added to the stanza in order to get ssh properly working on _hpcloud_.

Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

Example for HP Cloud:
  hp-cloud-az1:
    control-bucket: REDACTED
    admin-secret: REDACTED
    default-image-id: 75845
    region: az-1.region-a.geo-1
    project-name: <email address hidden>
    auth-url: https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/
    auth-mode: keypair
    authorized-key-path: ~/.ssh/juju_awesome_keys/
    type: openstack
    default-series: precise
    access-key: REDACTED
    secret-key: REDACTED
    default-instance-type: standard.medium

Ian Booth (wallyworld)
Changed in juju-core:
assignee: nobody → Ian Booth (wallyworld)
Ian Booth (wallyworld)
Changed in juju-core:
status: Triaged → Fix Committed
Changed in juju-core:
status: Fix Committed → Fix Released
Martin Packman (gz)
Changed in juju-core:
milestone: 2.0 → none
Curtis Hovey (sinzui)
Changed in juju:
status: Confirmed → Triaged
importance: High → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.