-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add microstack as provider #11
add microstack as provider #11
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great so far! Thanks for this!
src/bootstrap/index.ts
Outdated
await exec.exec(`curl http://cloud-images.ubuntu.com/${os_series}/current/${os_series}-server-cloudimg-amd64.img | openstack image create --public --container-format=bare --disk-format=qcow2 ${os_series}`); | ||
await exec.exec("mkdir /tmp/simplestreams"); | ||
await exec.exec(`IMAGE_ID=$(openstack image show ${os_series} -f value -c id) && juju metadata generate-image -d /tmp/simplestreams -s ${os_series} -i $IMAGE_ID -r ${os_region} -u http://10.20.20.1:5000/v3`); | ||
await exec.exec("echo '{clouds: {microstack: {type: openstack, auth-types: [access-key,userpass], regions: {microstack: {endpoint: http://10.20.20.1:5000/v3}}}}}' > /tmp/clouds.json"); | ||
await exec.exec("juju add-cloud --client microstack -f /tmp/clouds.json"); | ||
await exec.exec('source /var/snap/microstack/common/etc/microstack.rc && echo "{credentials: {microstack: {$OS_USERNAME: {auth-type: userpass, username: $OS_USERNAME, password: $OS_PASSWORD, project-domain-name: $OS_PROJECT_DOMAIN_NAME, tenant-name: $OS_PROJECT_NAME, user-domain-name: $OS_USER_DOMAIN_NAME, version: \'$OS_IDENTITY_API_VERSION\'}}}}" > /tmp/credentials.json'); | ||
await exec.exec("juju add-credential microstack -f /tmp/credentials.json --client"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be nice to encapsulate these steps into a Juju plugin akin to juju-crashdump
or juju-wait
, say juju-add-microstack
to make it easier for a user to use microstack with Juju locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I like this idea and I reported a bug in the microstack.
7f99d0a
to
a97a477
Compare
a97a477
to
bd800b4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and the passing run looks good as well.
Adding microstack as provider. This will help to run action related to deployment on top of OpenStack cloud.