No documentation on bootstrapping OpenStack with juju 2

Bug #1594958 reported by Jason Hobbs
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-core
Invalid
Undecided
Unassigned

Bug Description

There are no docs on how to setup juju 2 with OpenStack as the provider. There are some 1.x docs here https://jujucharms.com/docs/devel/howto-privatecloud but they aren't updated.

Most of this bug is documenting me struggling to get it running with guidance from the juju devs.

I'm trying to follow the directions here https://jujucharms.com/docs/devel/clouds to bootstrap juju against my OpenStack cloud.

I add the cloud to my clouds.yaml and then add it:

ubuntu@juju-test:~/openstack-base$ cat clouds.yaml
clouds:
  vpil-maas:
    type: maas
    auth-types: [oauth1]
    endpoint: http://10.246.64.50/MAAS
  vpil-openstack:
    type: openstack
    auth-types: [userpass]
    regions:
      RegionKVM:
        endpoint: http://10.246.64.111:5000/v2.0/
ubuntu@juju-test:~/openstack-base$ juju add-cloud vpil-openstack clouds.yaml

Then I add credentials:
ubuntu@juju-test:~/openstack-base$ juju add-credential vpil-openstack
  credential name: admin
  auth-type: userpass
  username: admin
  password:
  tenant-name: admin
  domain-name:
credentials added for cloud vpil-openstack

Then I try to bootstrap, but get errors:
http://paste.ubuntu.com/17668083/

I think this is the main error:
2016-06-21 20:15:06 DEBUG juju.environs.simplestreams simplestreams.go:454 skipping index "http://cloud-images.ubuntu.com/releases/streams/v1/index.sjson" because of missing information: index file has no data for cloud {RegionKVM http://10.246.64.111:5000/v2.0/} not found

This is with 2.0-beta9-0ubuntu1~16.04.1~juju1.

This mostly works against 1.25 btw, although I have to specify both metadata-source and image-metadata-url when juju tells me I should only have to do either or. See bug #1594977.

Tags: oil-2.0 v-pil
Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

Resolved the volume service errors, was missing a region setting, still getting the failure:

http://paste.ubuntu.com/17661655/

description: updated
Revision history for this message
james beedy (jamesbeedy) wrote :

Huge blocker - Lets get this figured out!

I think more thorough documentation surrounding bootstrapping the openstack provider is also in order here.

Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

I agree it may just be a documentation issue and me not knowing what to do.

There are some docs on how to setup a private cloud here, but they haven't been updated for 2.0 https://jujucharms.com/docs/devel/howto-privatecloud

I tried generating metadata and using it. Generating metadata went ok:
http://pastebin.ubuntu.com/17663001/

When I tried to bootstrap using that metadata source it seemed to be ignored and made no difference:
http://paste.ubuntu.com/17663075/

tags: added: v-pil
Revision history for this message
james beedy (jamesbeedy) wrote :

@jhobbs Yeeah .... I think its deeper then docs ... I've tried everything I can think of ... its failing similarly for me using Juju 1.x too though :-(

Revision history for this message
Jason Hobbs (jason-hobbs) wrote : Re: [Bug 1594958] Re: Bootstrapping on OpenStack fails with juju 2

@bdx.. I just tried 1.25 too and ended up in a similar place - filed bug
#1594977
but I still have a couple of things to try there.

On Tue, Jun 21, 2016 at 4:40 PM, james beedy <email address hidden> wrote:

> @jhobbs Yeeah .... I think its deeper then docs ... I've tried
> everything I can think of ... its failing similarly for me using Juju
> 1.x too though :-(
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1594958
>
> Title:
> Bootstrapping on OpenStack fails with juju 2
>
> Status in juju-core:
> New
>
> Bug description:
> I'm trying to follow the directions here
> https://jujucharms.com/docs/devel/clouds to bootstrap juju against my
> OpenStack cloud.
>
> I add the cloud to my clouds.yaml and then add it:
>
> ubuntu@juju-test:~/openstack-base$ cat clouds.yaml
> clouds:
> vpil-maas:
> type: maas
> auth-types: [oauth1]
> endpoint: http://10.246.64.50/MAAS
> vpil-openstack:
> type: openstack
> auth-types: [userpass]
> regions:
> RegionKVM:
> endpoint: http://10.246.64.111:5000/v2.0/
> ubuntu@juju-test:~/openstack-base$ juju add-cloud vpil-openstack
> clouds.yaml
>
> Then I add credentials:
> ubuntu@juju-test:~/openstack-base$ juju add-credential vpil-openstack
> credential name: admin
> auth-type: userpass
> username: admin
> password:
> tenant-name: admin
> domain-name:
> credentials added for cloud vpil-openstack
>
> Then I try to bootstrap, but get errors:
> http://paste.ubuntu.com/17661227/
>
> I think this is the main error:
> 2016-06-21 20:15:06 DEBUG juju.environs.simplestreams
> simplestreams.go:454 skipping index "
> http://cloud-images.ubuntu.com/releases/streams/v1/index.sjson" because
> of missing information: index file has no data for cloud {RegionKVM
> http://10.246.64.111:5000/v2.0/} not found
>
> This is with 2.0-beta9-0ubuntu1~16.04.1~juju1.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1594958/+subscriptions
>

Revision history for this message
Anastasia (anastasia-macmood) wrote : Re: Bootstrapping on OpenStack fails with juju 2

There are some bootstrap traces attached here that do not have --metadata-source specified as an option to bootstrap command. It definitely should be included when bootstrapping private cloud.

I will double-check that we take it into consideration.

The directory structure that the argument is pointing to, including file contents, might be helpful for further investigation.

Changed in juju-core:
status: New → Incomplete
Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

Sorry, I must have linked the wrong pastebin; I updated it in the description. Here is the bootstrap trace with metadata-source being used:

http://paste.ubuntu.com/17661227/

Here is the directory structure of that directory:
http://paste.ubuntu.com/17668127/

description: updated
Changed in juju-core:
status: Incomplete → New
description: updated
Revision history for this message
Anastasia (anastasia-macmood) wrote :

@Jason,

The bootstrap command pasted here still does not have --metadata-source specified. I am seeing ` juju bootstrap --debug vpil-openstack-controller vpil-openstack`. Is this correct?

Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

One more try, here is the output with metadata-source - http://paste.ubuntu.com/17668083/

Changed in juju-core:
status: New → Triaged
assignee: nobody → Anastasia (anastasia-macmood)
Revision history for this message
Anastasia (anastasia-macmood) wrote :

Jason,

I am a bit confused. Are you sure that you are happy with you cloud configuration?

The things that stand out for me:
1. Your region name is camel-cased. Everything I've seen only has lower-case only names.
2. When I bootstrap, I also see "keystone catalog" (see below)
3. Also, my --metadata-source is taken into consideration.

(I have registered cloud and credentials similar to yours above).

2016-06-22 01:01:51 INFO cmd cmd.go:129 Creating Juju controller "vpil-openstack-controller" on openstack/serverstack
***2016-06-22 01:01:51 DEBUG juju.environs imagemetadata.go:112 obtained image datasource "keystone catalog"***
2016-06-22 01:01:51 DEBUG juju.environs imagemetadata.go:112 obtained image datasource "default cloud images"
2016-06-22 01:01:51 DEBUG juju.environs imagemetadata.go:112 obtained image datasource "default ubuntu cloud images"
2016-06-22 01:01:58 INFO juju.cmd.juju.commands bootstrap.go:559 combined bootstrap constraints:
***2016-06-22 01:01:58 INFO juju.environs.bootstrap bootstrap.go:495 Setting default tools and image metadata sources: /home/anastasia/cloudimages***
2016-06-22 01:01:58 DEBUG juju.environs imagemetadata.go:46 new user image datasource registered: bootstrap metadata
***2016-06-22 01:01:58 INFO juju.environs.bootstrap bootstrap.go:521 custom image metadata added to search path***

Revision history for this message
Anastasia (anastasia-macmood) wrote :

It is possible that this has been fixed between the beta9 and tip master. I am running against tip (2.0-beta10 gc go1.6)

Revision history for this message
Jason Hobbs (jason-hobbs) wrote : Re: [Bug 1594958] Re: Bootstrapping on OpenStack fails with juju 2
Download full text (3.8 KiB)

Anastasia,

Yes, the region name is correct. Region names in OpenStack don't have to be
all lowercase.

Here is the output of keystone catalog, showing the region name:
http://paste.ubuntu.com/17674891/

Are there any additional logs I can gather to help explain why I'm not
seeing "keystone catalog" and my --metadata-source is being ignored?

If I change my credentials to use the wrong password, I get an
authentication failure, so it appears it is logging into keystone.

Jason

On Tue, Jun 21, 2016 at 8:11 PM, Anastasia <email address hidden>
wrote:

> Jason,
>
> I am a bit confused. Are you sure that you are happy with you cloud
> configuration?
>
> The things that stand out for me:
> 1. Your region name is camel-cased. Everything I've seen only has
> lower-case only names.
> 2. When I bootstrap, I also see "keystone catalog" (see below)
> 3. Also, my --metadata-source is taken into consideration.
>
> (I have registered cloud and credentials similar to yours above).
>
> 2016-06-22 01:01:51 INFO cmd cmd.go:129 Creating Juju controller
> "vpil-openstack-controller" on openstack/serverstack
> ***2016-06-22 01:01:51 DEBUG juju.environs imagemetadata.go:112 obtained
> image datasource "keystone catalog"***
> 2016-06-22 01:01:51 DEBUG juju.environs imagemetadata.go:112 obtained
> image datasource "default cloud images"
> 2016-06-22 01:01:51 DEBUG juju.environs imagemetadata.go:112 obtained
> image datasource "default ubuntu cloud images"
> 2016-06-22 01:01:58 INFO juju.cmd.juju.commands bootstrap.go:559 combined
> bootstrap constraints:
> ***2016-06-22 01:01:58 INFO juju.environs.bootstrap bootstrap.go:495
> Setting default tools and image metadata sources:
> /home/anastasia/cloudimages***
> 2016-06-22 01:01:58 DEBUG juju.environs imagemetadata.go:46 new user image
> datasource registered: bootstrap metadata
> ***2016-06-22 01:01:58 INFO juju.environs.bootstrap bootstrap.go:521
> custom image metadata added to search path***
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1594958
>
> Title:
> Bootstrapping on OpenStack fails with juju 2
>
> Status in juju-core:
> Triaged
>
> Bug description:
> I'm trying to follow the directions here
> https://jujucharms.com/docs/devel/clouds to bootstrap juju against my
> OpenStack cloud.
>
> I add the cloud to my clouds.yaml and then add it:
>
> ubuntu@juju-test:~/openstack-base$ cat clouds.yaml
> clouds:
> vpil-maas:
> type: maas
> auth-types: [oauth1]
> endpoint: http://10.246.64.50/MAAS
> vpil-openstack:
> type: openstack
> auth-types: [userpass]
> regions:
> RegionKVM:
> endpoint: http://10.246.64.111:5000/v2.0/
> ubuntu@juju-test:~/openstack-base$ juju add-cloud vpil-openstack
> clouds.yaml
>
> Then I add credentials:
> ubuntu@juju-test:~/openstack-base$ juju add-credential vpil-openstack
> credential name: admin
> auth-type: userpass
> username: admin
> password:
> tenant-name: admin
> domain-name:
> credentials added for cloud vpil-openstack
>
> Then I try to bootstrap, but get errors:
> http://paste.ubunt...

Read more...

Changed in juju-core:
status: Triaged → Incomplete
assignee: Anastasia (anastasia-macmood) → nobody
Changed in juju-core:
assignee: nobody → Anastasia (anastasia-macmood)
Changed in juju-core:
assignee: Anastasia (anastasia-macmood) → nobody
Revision history for this message
Anastasia (anastasia-macmood) wrote : Re: Bootstrapping on OpenStack fails with juju 2

I got the [2.0-beta9 gc go1.6] build and am not able to reproduce what you are seeing yet.

Notable differences so far:
1. your go version seems to be 1.6.1
2. I am using .novarc file for credentials

I'll keep digging.

Changed in juju-core:
assignee: nobody → Anastasia (anastasia-macmood)
Revision history for this message
Anastasia (anastasia-macmood) wrote :

Jason,

I have added credentials the same way you did to minimise difference and now besides go1.6 vs go 1.6.1, I do not know how your setup differs to mine.

Is it possible for you to attach (pastebin or email if privacy is a concern) the contents of <juju home>/clouds.yaml? Default <juju home> is ~/.local/share/juju

Changed in juju-core:
assignee: Anastasia (anastasia-macmood) → nobody
Revision history for this message
Anastasia (anastasia-macmood) wrote :

I have also found this: https://bugs.launchpad.net/juju-core/+bug/1591488

Would it be possible to serve images over web server?

Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

Anastasia,

Here is the contents of my clouds.yaml: http://paste.ubuntu.com/17710630/

Yes, I can use a webserver. I had to do that to get juju 1.25 to work. I do not know how to specify the image-metadata-url option in juju 2.0 as there is no longer an environments.yaml.

Revision history for this message
Cheryl Jennings (cherylj) wrote :

Jason - you can specify bootstrap config with --config:

juju bootstrap <controller name> <cloud> --config image-metadata-url=<URL> --config other-config=setting ...

Revision history for this message
Jason Hobbs (jason-hobbs) wrote : Re: [Bug 1594958] Re: Bootstrapping on OpenStack fails with juju 2

Cheryl,

Thanks. I tried that and I get an error:

2016-06-22 19:41:39 ERROR juju.environs.config config.go:1100 unknown
config field "--image-metadata-url"

Traceback:
http://paste.ubuntu.com/17713435/

Jason

On 06/22/2016 02:00 PM, Cheryl Jennings wrote:
> --config image-metadata-
> url

Revision history for this message
Jason Hobbs (jason-hobbs) wrote : Re: Bootstrapping on OpenStack fails with juju 2

I was using "--config --image-metadata-url" instead of "--config image-metadata-url". I will try again.

Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

Cheryl, Anastasia, thanks for the guidance.

I have been able to get the bootstrap to start and use my local images by using this command:

juju bootstrap vpil-openstack-controller vpil-openstack --upload-tools --config image-metadata-url=http://10.246.64.51/images/

where http://10.246.64.51/images/ is a webserver hosting output from juju metadata generate-image.

Here is that command:
juju metadata generate-image -r RegionKVM -u http://10.246.64.121:5000/v2.0 -d images -i 5d9e51a2-3970-4401-a4ce-94f028baea7f

So, it seems this is really a documentation bug since it's not documented anywhere (that I have been able to find) how to do this.

summary: - Bootstrapping on OpenStack fails with juju 2
+ No documentation on bootstrapping OpenStack with juju 2
Changed in juju-core:
status: Incomplete → New
description: updated
tags: added: oil-2.0
Revision history for this message
Cheryl Jennings (cherylj) wrote :

Documentation issues are tracked in github. Looks like there's already an issue for this opened: https://github.com/juju/docs/issues/1006

Changed in juju-core:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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