Jump to: navigation, search

Difference between revisions of "Designate/Vancouver/Workshop"

(Designate Installation Instructions)
 
(6 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
Several of the Designate contributors will be on hand during the workshop to help attendees work through the deployment.
 
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”
+
See also: [https://openstacksummitmay2015vancouver.sched.org/event/d4cfac6323519e803c9d7797036ed0a2?iframe=no&w=i:100;&sidebar=yes&bg=no#.VVutXRZSbjI DNS For Your Cloud - OpenStack Designate]
  
 
== Designate Installation Instructions ==
 
== Designate Installation Instructions ==
  
=== Install Designate ===
+
====Install Designate and its dependencies====
# Start the VM
+
cd /home/vagrant/designate
#:*vagrant up
 
# Log into the VM
 
#:* vagrant ssh
 
# 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
 
# 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
 
# 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
 
# 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 ====
+
pip install -r requirements.txt
:* sudo netstat -tnlp (look for '''pdns_server-in''')
 
  
==== Test PowerDNS ====
+
sudo python setup.py develop
:* dig @localhost openstack.com (You should get some response with status:SERVFAIL)
 
  
==== Create, Initialize and sync the databases ====
+
====Configuration====
===== The Designate database =====
+
cd /home/vagrant/designate/etc/designate
:* 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 =====
+
The configuration file is set for you at etc/designate/designate.conf, you can diff it with designate.conf.sample if you'd like to see the differences.
(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 ====
+
=====Create directory for maintaining designate log files=====
:* sudo designate-api &
+
This directory was referenced by 'logdir' variable in designate.conf file.
  
==== Check services are up ====
+
mkdir /home/vagrant/logs/
:* ps aux | grep designate
 
  
==== Setup the Designate Keystone service and endpoints ====
+
====Create, Initialize and sync the databases====
 +
=====The Designate database=====
 +
 
 +
mysql -e 'CREATE DATABASE `designate` CHARACTER SET utf8 COLLATE utf8_general_ci;'
 +
 
 +
designate-manage database sync
 +
 
 +
=====The PowerDNS database=====
 +
 
 +
mysql -e 'CREATE DATABASE `powerdns` CHARACTER SET utf8 COLLATE utf8_general_ci;'
 +
 
 +
designate-manage powerdns sync f26e0b32-736f-4f0a-831b-039a415c481e
 +
 
 +
====Restart pDNS after replacing it's DB====
 +
 
 +
sudo service pdns restart
 +
 
 +
====Start the Designate Central Service====
 +
 
 +
sudo start designate-central
 +
 
 +
====Start the Designate API Service====
 +
 
 +
sudo start designate-api
 +
 
 +
====Start the Designate mDNS Service====
 +
 
 +
sudo start designate-mdns
 +
 
 +
====Start the Designate Pool Manager Service====
 +
 
 +
sudo start designate-pool-manager
 +
 
 +
====Setup the Designate Keystone service and endpoints====
 
First set user 'admin' particulars then create service and endpoint
 
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
 
  
=== Install Designate Client ===
+
source /home/vagrant/openrc.admin
:* cd /home/vagrant/python-designateclient
+
 
:* sudo pip install -r requirements.txt -r test-requirements.txt
+
keystone service-create --name designate --type dns --description "Designate Service"
:* sudo python setup.py develop
+
 
===== Test Designate Client =====
+
keystone endpoint-create --service designate --publicurl http://127.0.0.1:9001
:* cd /home/vagrant
+
 
:* source openrc.admin
+
====Confirm the service exists====
:* designate --debug server-list
+
 
 +
keystone catalog --service dns
 +
 
 +
====Install Designate Client====
 +
 
 +
cd /home/vagrant/python-designateclient
 +
 
 +
sudo pip install -r requirements.txt
 +
 
 +
sudo python setup.py develop
 +
 
 +
====Install Designate Horizon Panels====
 +
 
 +
cd /home/vagrant/designate/contrib/designate-dashboard
 +
 
 +
truncate -s0 requirements.txt
 +
 
 +
python setup.py sdist
 +
 
 +
sudo pip install dist/*.tar.gz
 +
 
 +
sudo cp designatedashboard/enabled/_70_dns_add_group.py /usr/share/openstack-dashboard/openstack_dashboard/local/enabled
 +
 
 +
sudo cp designatedashboard/enabled/_71_dns_project.py /usr/share/openstack-dashboard/openstack_dashboard/local/enabled
  
=== Exercise the Designate API ===
+
sudo service apache2 restart
=====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 ==
+
====Tell designate what you want your ns records to be====
* killall designate-api
 
* killall designate-central
 
  
:Also, other log files exist in '''/var/log''' (e.g syslog for traces on services such as PowerDNS)
+
designate server-create --name ns.example.com.
  
 
= Additional Notes on the workshop =
 
= 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.
 
*A single node was used so that it is easier to control and easier for newbies to install.

Latest revision as of 22:19, 19 May 2015

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

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: DNS For Your Cloud - OpenStack Designate

Designate Installation Instructions

Install Designate and its dependencies

cd /home/vagrant/designate

pip install -r requirements.txt

sudo python setup.py develop

Configuration

cd /home/vagrant/designate/etc/designate

The configuration file is set for you at etc/designate/designate.conf, you can diff it with designate.conf.sample if you'd like to see the differences.

Create directory for maintaining designate log files

This directory was referenced by 'logdir' variable in designate.conf file.

mkdir /home/vagrant/logs/

Create, Initialize and sync the databases

The Designate database

mysql -e 'CREATE DATABASE `designate` CHARACTER SET utf8 COLLATE utf8_general_ci;'

designate-manage database sync

The PowerDNS database

mysql -e 'CREATE DATABASE `powerdns` CHARACTER SET utf8 COLLATE utf8_general_ci;'

designate-manage powerdns sync f26e0b32-736f-4f0a-831b-039a415c481e

Restart pDNS after replacing it's DB

sudo service pdns restart

Start the Designate Central Service

sudo start designate-central

Start the Designate API Service

sudo start designate-api

Start the Designate mDNS Service

sudo start designate-mdns

Start the Designate Pool Manager Service

sudo start designate-pool-manager

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

Confirm the service exists

keystone catalog --service dns

Install Designate Client

cd /home/vagrant/python-designateclient

sudo pip install -r requirements.txt

sudo python setup.py develop

Install Designate Horizon Panels

cd /home/vagrant/designate/contrib/designate-dashboard

truncate -s0 requirements.txt

python setup.py sdist

sudo pip install dist/*.tar.gz

sudo cp designatedashboard/enabled/_70_dns_add_group.py /usr/share/openstack-dashboard/openstack_dashboard/local/enabled

sudo cp designatedashboard/enabled/_71_dns_project.py /usr/share/openstack-dashboard/openstack_dashboard/local/enabled

sudo service apache2 restart

Tell designate what you want your ns records to be

designate server-create --name ns.example.com.

Additional Notes on the workshop

  • A single node was used so that it is easier to control and easier for newbies to install.