Jump to: navigation, search

Difference between revisions of "Designate/Atlanta/Workshop 1"

 
(53 intermediate revisions by 2 users not shown)
Line 11: Line 11:
 
See also: "Designate: An Overview of DNSaaS for Openstack" and “Designate: Deep Dive for Operators/Deployers”
 
See also: "Designate: An Overview of DNSaaS for Openstack" and “Designate: Deep Dive for Operators/Deployers”
  
== Designate Installation Instructions - DRAFT ==
+
== Designate Installation Instructions ==
  
=== 1. Verify VM and Openstack core components are installed and correctly configured ===
+
=== Install Designate ===
# verify python environment is installed
+
# Start the VM
#:pip: ''<cmd>''
+
#:*vagrant up
#:virtualenv: ''<cmd>''
+
# Log into the VM
# verify RabbitMQ Server is installed and configured correctly:
+
#:* vagrant ssh
# verify Glance Service is installed and configured correctly:
 
# verify Glance Client is installed and configured correctly:
 
# verify Keystone Service is installed and configured correctly:
 
# verify Keystone Client is installed and configured correctly:
 
# verify Neutron Service is installed and configured correctly:
 
# verify Neutron Client is installed and configured correctly:
 
# verify Nova Service is installed and configured correctly:
 
# verify Nova Client is installed and configured correctly:
 
# verify MySQL is installed: <cmd>
 
# verify MySQl is configured correctly:
 
=== 2. Install Designate ===
 
# Install system package dependencies
 
#:$ apt-get build-dep python-lxml
 
# Clone the Designate repo off of Stackforge
 
#:$ git clone https://github.com/stackforge/designate.git
 
#:$ cd designate
 
# Setup virtual env
 
#:$ virtualenv --no-site-packages .venv
 
#:$ . .venv/bin/activate
 
 
# Install Designate and its dependencies
 
# Install Designate and its dependencies
#:$ pip install -r requirements.txt -r test-requirements.txt
+
#:* cd  /home/vagrant/designate
#:$ python setup.py develop
+
#:* ''sudo apt-get -y build-dep python-lxml''
# Copy sample config files to edit
+
#:* ''sudo pip install -r requirements.txt -r test-requirements.txt''
#:$ cd etc/designate
+
#:*  sudo python setup.py develop
#:$ ls *.sample | while read f; do cp $f $(echo $f | sed "s/.sample$//g"); done
+
# Make copies of designate config files from templates
# Install the DNS server, PowerDNS
+
#:* cd etc/designate (/home/vagrant/designate/etc/designate)
#Grant sudo permissions if you intend to run Designate as a non-root user
+
#:* ls *.sample | while read f; do cp $f $(echo $f | sed "s/.sample$//g"); done
#Make the directory for Designate’s log files
+
# Copy over config file with pre-set values to designate.conf
=== 3. Configure Designate ===
+
#: (Replace contents of designate.conf with contents of file /home/vagrant/designate.conf.wkshp )
#: editor (vi) designate.conf
+
#:* cp /home/vagrant/designate.conf.wkshp ./designate.conf
 +
# Create directory for maintaining designate state information (this directory was referenced by 'state_path' variable in designate.conf file)
 +
#:* sudo mkdir /var/lib/designate
 +
# Create directory for maintaining designate log files (this directory was referenced by 'logdir' variable in designate.conf file)
 +
#:* sudo mkdir /home/vagrant/designate/log
 +
==== Verify the DNS server (PowerDNS) config ====
 +
Verify 'gmysql-dbname='''pdns'''' in /etc/powerdns/pdns.d/pdns.local.gmysql
 +
:* cat /etc/powerdns/pdns.d/pdns.local.gmysql
  
 +
==== Verify PowerDNS is running on port 53 ====
 +
:* sudo netstat -tnlp (look for '''pdns_server-in''')
  
=== 4. Initialize & Start the Designate Central Service ===
+
==== Test PowerDNS ====
=== 5. Initialize & Start the Designate API Service ===
+
:* dig @localhost openstack.com (You should get some response with status:SERVFAIL)
=== 6. Exercise the Designate API ===
 
Sample Helpful commands below in "Other Designate Workshop Command Lines"
 
  
 +
==== Create, Initialize and sync the databases ====
 +
===== The Designate database =====
 +
:* mysql -e 'CREATE DATABASE `designate` CHARACTER SET utf8 COLLATE utf8_general_ci;'
 +
:* sudo designate-manage database init
 +
:* sudo designate-manage database sync
  
== Other Designate Workshop Command Lines ==
+
===== The PowerDNS database =====
 +
(Database already exists. Just init and sync)
 +
:* sudo designate-manage powerdns init
 +
:* sudo designate-manage powerdns sync
 +
==== Start the Designate Central Service ====
 +
:* sudo designate-central &
 +
 
 +
==== Start the Designate API Service ====
 +
:* sudo designate-api &
 +
 
 +
==== Check services are up ====
 +
:* ps aux | grep designate
  
= Additional Notes on the workshop =
+
====  Setup the Designate Keystone service and endpoints ====
 +
First set user 'admin' particulars then create service and endpoint
 +
:* source /home/vagrant/openrc.admin
 +
:* keystone service-create --name designate --type dns --description "Designate Service"
 +
:* keystone endpoint-create --service designate --publicurl http://127.0.0.1:9001/v1 --adminurl http://127.0.0.1:9001/v1 --internalurl http://127.0.0.1:9001/v1
  
I chose PowerDNS as the backend rather than BIND as it is more well tested as of now. I put in a single node – so that it is easier to control and easier for newbies to install. Also we talked about the workshop showing migration to Designate. However I think it is early at this point for us to talk about migration as we have not yet done a migrate with Designate.
+
=== Install Designate Client ===
 +
:* cd /home/vagrant/python-designateclient
 +
:* sudo pip install -r requirements.txt -r test-requirements.txt
 +
:* sudo python setup.py develop
 +
===== Test Designate Client =====
 +
:* cd /home/vagrant
 +
:* source openrc.admin
 +
:* designate --debug server-list
  
= Removed =
+
=== Exercise the Designate API ===
 +
=====Test API locally on VM: =====
 +
:* curl http://localhost:9001
 +
=====Test API from External Client (e.g. Google Chrome HTTP Client):=====
 +
:* http://localhost:9001/v2/
 +
More Sample Helpful commands below in "Other Designate Workshop Command Lines"
  
 +
== Other Designate Workshop Command Lines ==
 +
* killall designate-api
 +
* killall designate-central
  
:
+
:Also, other log files exist in '''/var/log''' (e.g syslog for traces on services such as PowerDNS)
  
* REST API for domain & record management
+
= Additional Notes on the workshop =
* Multi-tenant
+
*PowerDNS was used as the backend rather than BIND as it is better tested as of now. 
* Integrated with Keystone for authentication
+
*A single node was used so that it is easier to control and easier for newbies to install.
* Framework in place to integrate with Nova and Neutron notifications (for auto-generated records)
 
* Support for PowerDNS and Bind9 out of the box
 

Latest revision as of 15:46, 7 May 2014

Designate: Interactive Workshop - Install and Operate - Openstack Summit, May 2014

Designate provides DNSaaS services for OpenStack.

This interactive workshop will guide attendees on how Designate can be installed with PowerDNS. For the purposes of the workshop the various designate components will be installed on a single node. Once installed it shows some of the V1 and V2 APIs for domain and record management. The workshop will conclude by using a tool like dig to retrieve the added records from the PowerDNS backend, showing a fully functional by-hand deployment.

The workshop will also cover the steps for contributing to the development of Designate.

Several of the Designate contributors will be on hand during the workshop to help attendees work through the deployment.

See also: "Designate: An Overview of DNSaaS for Openstack" and “Designate: Deep Dive for Operators/Deployers”

Designate Installation Instructions

Install Designate

  1. Start the VM
    • vagrant up
  2. Log into the VM
    • vagrant ssh
  3. Install Designate and its dependencies
    • cd /home/vagrant/designate
    • sudo apt-get -y build-dep python-lxml
    • sudo pip install -r requirements.txt -r test-requirements.txt
    • sudo python setup.py develop
  4. Make copies of designate config files from templates
    • cd etc/designate (/home/vagrant/designate/etc/designate)
    • ls *.sample | while read f; do cp $f $(echo $f | sed "s/.sample$//g"); done
  5. Copy over config file with pre-set values to designate.conf
    (Replace contents of designate.conf with contents of file /home/vagrant/designate.conf.wkshp )
    • cp /home/vagrant/designate.conf.wkshp ./designate.conf
  6. Create directory for maintaining designate state information (this directory was referenced by 'state_path' variable in designate.conf file)
    • sudo mkdir /var/lib/designate
  7. Create directory for maintaining designate log files (this directory was referenced by 'logdir' variable in designate.conf file)
    • sudo mkdir /home/vagrant/designate/log

Verify the DNS server (PowerDNS) config

Verify 'gmysql-dbname=pdns' in /etc/powerdns/pdns.d/pdns.local.gmysql

  • cat /etc/powerdns/pdns.d/pdns.local.gmysql

Verify PowerDNS is running on port 53

  • sudo netstat -tnlp (look for pdns_server-in)

Test PowerDNS

  • dig @localhost openstack.com (You should get some response with status:SERVFAIL)

Create, Initialize and sync the databases

The Designate database
  • mysql -e 'CREATE DATABASE `designate` CHARACTER SET utf8 COLLATE utf8_general_ci;'
  • sudo designate-manage database init
  • sudo designate-manage database sync
The PowerDNS database

(Database already exists. Just init and sync)

  • sudo designate-manage powerdns init
  • sudo designate-manage powerdns sync

Start the Designate Central Service

  • sudo designate-central &

Start the Designate API Service

  • sudo designate-api &

Check services are up

  • ps aux | grep designate

Setup the Designate Keystone service and endpoints

First set user 'admin' particulars then create service and endpoint

Install Designate Client

  • cd /home/vagrant/python-designateclient
  • sudo pip install -r requirements.txt -r test-requirements.txt
  • sudo python setup.py develop
Test Designate Client
  • cd /home/vagrant
  • source openrc.admin
  • designate --debug server-list

Exercise the Designate API

Test API locally on VM:
Test API from External Client (e.g. Google Chrome HTTP Client):

More Sample Helpful commands below in "Other Designate Workshop Command Lines"

Other Designate Workshop Command Lines

  • killall designate-api
  • killall designate-central
Also, other log files exist in /var/log (e.g syslog for traces on services such as PowerDNS)

Additional Notes on the workshop

  • PowerDNS was used as the backend rather than BIND as it is better tested as of now.
  • A single node was used so that it is easier to control and easier for newbies to install.