# DataDogHq

* [Install OpenStack in two commands for dev and test](https://www.datadoghq.com/blog/install-openstack-in-two-commands/)

@ Digital Ocean Ubuntu 8.1

```
root@debiando:~# gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <mpapis@gmail.com>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
root@debiando:~#
```

```bash
root@debiando:~# gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <mpapis@gmail.com>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
root@debiando:~#
```

```bash
root@debiando:~# rvm get stable --autolibs=enable
root@debiando:~# rvm install ruby
root@debiando:~# rvm --default use ruby-2.3.1
```

```bash
root@debiando:~# gem -v
2.5.1
root@debiando:~#
```

```bash
root@debiando:~# gem update --system
Updating rubygems-update
Fetching: rubygems-update-2.6.6.gem (100%)
Successfully installed rubygems-update-2.6.6
Parsing documentation for rubygems-update-2.6.6
Installing ri documentation for rubygems-update-2.6.6
Installing darkfish documentation for rubygems-update-2.6.6
Done installing documentation for rubygems-update after 53 seconds
Parsing documentation for rubygems-update-2.6.6
Done installing documentation for rubygems-update after 0 seconds
Installing RubyGems 2.6.6
root@debiando:~#
```

```bash
root@debiando:~# gem install tugboat
Fetching: thor-0.18.1.gem (100%)
Successfully installed thor-0.18.1
Fetching: multipart-post-2.0.0.gem (100%)
Successfully installed multipart-post-2.0.0
Fetching: faraday-0.9.2.gem (100%)
Successfully installed faraday-0.9.2
Fetching: faraday_middleware-0.10.0.gem (100%)
Successfully installed faraday_middleware-0.10.0
Fetching: hashie-3.4.4.gem (100%)
Successfully installed hashie-3.4.4
Fetching: barge-0.12.0.gem (100%)
Successfully installed barge-0.12.0
Fetching: middleware-0.1.0.gem (100%)
Successfully installed middleware-0.1.0
Fetching: tugboat-2.2.2.gem (100%)
***************************************
Successfully installed tugboat-2.2.2
Parsing documentation for thor-0.18.1
Installing ri documentation for thor-0.18.1
invalid options: -SHN
(invalid options are ignored)
Parsing documentation for multipart-post-2.0.0
Installing ri documentation for multipart-post-2.0.0
Parsing documentation for faraday-0.9.2
Installing ri documentation for faraday-0.9.2
Parsing documentation for faraday_middleware-0.10.0
Installing ri documentation for faraday_middleware-0.10.0
Parsing documentation for hashie-3.4.4
Installing ri documentation for hashie-3.4.4
Parsing documentation for barge-0.12.0
Installing ri documentation for barge-0.12.0
Parsing documentation for middleware-0.1.0
Installing ri documentation for middleware-0.1.0
Parsing documentation for tugboat-2.2.2
Installing ri documentation for tugboat-2.2.2
Done installing documentation for thor, multipart-post, faraday, faraday_middleware, hashie, barge, middleware, tugboat after 5 seconds
8 gems installed
root@debiando:~#
```

[Authentication](https://cloud.digitalocean.com/settings/api/tokens)

```bash
root@debiando:~# tugboat authorize
Note: You can get your Access Token from https://cloud.digitalocean.com/settings/tokens/new

Enter your access token: dd155002f6e12f5c5806a0ca9636308f855727ed286fc6e74cf63ca12b4b238e
Enter your SSH key path (optional, defaults to ~/.ssh/id_rsa): 
Enter your SSH user (optional, defaults to root): root
Enter your SSH port number (optional, defaults to 22): 22

To retrieve region, image, size and key ID's, you can use the corresponding tugboat command, such as `tugboat images`.
Defaults can be changed at any time in your ~/.tugboat configuration file.

Enter your default region (optional, defaults to nyc1): 
Enter your default image ID or image slug (optional, defaults to ubuntu-14-04-x64): 
Enter your default size (optional, defaults to 512mb)): 
Enter your default ssh key IDs (optional, defaults to none, array of IDs of ssh keys eg. ['1234']): 
Enter your default for private networking (optional, defaults to false): 
Enter your default for enabling backups (optional, defaults to false): 
Enter your default for IPv6 (optional, defaults to false): 
Authentication with DigitalOcean was successful.
root@debiando:~#
```

```bash
root@debiando:~# wget https://raw.githubusercontent.com/DataDog/the-monitor/master/openstack/devstack/deploy_droplet.py
--2016-08-06 23:30:00--  https://raw.githubusercontent.com/DataDog/the-monitor/master/openstack/devstack/deploy_droplet.py
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.40.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.40.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1410 (1.4K) [text/plain]
Saving to: ‘deploy_droplet.py’

deploy_droplet.py         100%[======================================>]   1.38K  --.-KB/s   in 0s     

2016-08-06 23:30:01 (12.6 MB/s) - ‘deploy_droplet.py’ saved [1410/1410]

root@debiando:~#
```

```bash
root@debiando:~# ./deploy_droplet.py openstackiando
Queueing creation of droplet 'openstackiando'...Failed to create Droplet: You specified an invalid image for Droplet creation.
Droplet fuzzy name provided. Finding droplet ID...done, 21792922 (openstackiando)
Waiting for droplet to become active........done (14s)
IP: 138.68.52.41
Run the following (in order): 
ssh root@138.68.52.41 'bash -s' < stack_setup.sh
ssh root@138.68.52.41
sudo -iu stack /usr/local/src/devstack/stack.sh
root@debiando:~#
```

```bash
root@debiando:~# ssh root@138.68.52.41 'bash -s' < stack_setup.sh
...
Setting up git (1:1.9.1-1ubuntu0.3) ...
Cloning into 'devstack'...
Creating a group called stack
Creating a user called stack
Giving stack user passwordless sudo privileges
root@debiando:~#
```

```bash
root@debiando:~# ssh root@138.68.52.41
root@138.68.52.41's password: 
Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-31-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Sun Aug  7 04:23:10 UTC 2016

  System load:  0.06              Processes:           107
  Usage of /:   4.4% of 29.40GB   Users logged in:     0
  Memory usage: 6%                IP address for eth0: 138.68.52.41
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

0 packages can be updated.
0 updates are security updates.

New release '16.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.


Last login: Sun Aug  7 04:22:34 2016 from 187.201.32.249
root@openstackiando:~#
```

```bash
root@openstackiando:~# sudo -iu stack bash /usr/local/src/devstack/stack.sh
...
```

Error!

```bash
root@openstackiando:~# cd /opt/stack/keystone
root@openstackiando:/opt/stack/keystone# git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/master
  remotes/origin/stable/liberty
  remotes/origin/stable/mitaka
root@openstackiando:/opt/stack/keystone# git checkout -b stable/kilo
Switched to a new branch 'stable/kilo'
root@openstackiando:/opt/stack/keystone# git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
root@openstackiando:/opt/stack/keystone# cd -
root@openstackiando:~# sudo -iu stack /usr/local/src/devstack/stack.sh
```

Error!

```bash
root@openstackiando:~# cd /opt/stack/glance
root@openstackiando:/opt/stack/glance# git checkout -b stable/kilo
Switched to a new branch 'stable/kilo'
root@openstackiando:/opt/stack/glance# git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
root@openstackiando:/opt/stack/glance# cd -
/root
root@openstackiando:~# sudo -iu stack /usr/local/src/devstack/stack.sh
```

Error!

```bash
root@openstackiando:~# cd /opt/stack/cinder
root@openstackiando:/opt/stack/cinder# git checkout -b stable/kilo
Switched to a new branch 'stable/kilo'
root@openstackiando:/opt/stack/cinder# git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
root@openstackiando:/opt/stack/cinder# cd -
/root
root@openstackiando:~# sudo -iu stack /usr/local/src/devstack/stack.sh
```

Error!

```bash
root@openstackiando:~# cd /opt/stack/neutron/
root@openstackiando:/opt/stack/neutron# git checkout -b stable/kilo
Switched to a new branch 'stable/kilo'
root@openstackiando:/opt/stack/neutron# git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
root@openstackiando:/opt/stack/neutron# cd -
/root
root@openstackiando:~# sudo -iu stack /usr/local/src/devstack/stack.sh
```

Error!

```bash
root@openstackiando:~# cd /opt/stack/nova
root@openstackiando:/opt/stack/nova# git checkout -b stable/kilo
Switched to a new branch 'stable/kilo'
root@openstackiando:/opt/stack/nova# git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
root@openstackiando:/opt/stack/nova# cd -
/root
root@openstackiando:~# sudo -iu stack /usr/local/src/devstack/stack.sh
```

Error!

```bash
root@openstackiando:~# cd /opt/stack/horizon
root@openstackiando:/opt/stack/horizon# git checkout -b stable/kilo
Switched to a new branch 'stable/kilo'
root@openstackiando:/opt/stack/horizon# git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
root@openstackiando:/opt/stack/horizon# cd -
/root
root@openstackiando:~# sudo -iu stack /usr/local/src/devstack/stack.sh
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://theiotlearninginitiative.gitbook.io/internetofthingscloud/projects/openstack/devstack/datadoghq.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
