[doc] Update Ubuntu dev environment doc

Get the dev doc up to date, and delete some old ones that are
outdated.

Change-Id: Iee2c117b2dff6a5d9fcf486d201da32773055dec
This commit is contained in:
Tim Simmons 2017-02-23 21:41:36 +00:00 committed by Graham Hayes
parent ce43cecfc8
commit 9d39448ab2
5 changed files with 108 additions and 388 deletions

View File

@ -1,98 +0,0 @@
[DEFAULT]
########################
## General Configuration
########################
# Show more verbose log output (sets INFO log level output)
verbose = True
# Show debugging output in logs (sets DEBUG log level output)
debug = True
# Top-level directory for maintaining designate's state
state_path = /var/lib/designate
# Log directory #Make sure and create this directory, or set it to some other directory that exists
logdir = /var/log/designate
# Driver used for issuing notifications
notification_driver = messaging
# Use "sudo designate-rootwrap /etc/designate/rootwrap.conf" to use the real
# root filter facility.
# Change to "sudo" to skip the filtering and just run the command directly
# root_helper = sudo
########################
## Service Configuration
########################
#-----------------------
# Central Service
#-----------------------
[service:central]
# Driver used for backend communication (e.g. fake, rpc, bind9, powerdns)
backend_driver = powerdns
# Maximum domain name length
max_domain_name_len = 255
# Maximum record name length
max_record_name_len = 255
#-----------------------
# API Service
#-----------------------
[service:api]
# Address to bind the API server
api_host = 0.0.0.0
# Port the bind the API server to
api_port = 9001
# Authentication strategy to use - can be either "noauth" or "keystone"
auth_strategy = keystone
# Enabled API Version 1 extensions
enabled_extensions_v1 = diagnostics, quotas, reports, sync
#-----------------------
# Keystone Middleware
#-----------------------
[keystone_authtoken]
auth_host = 127.0.0.1
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = designate
admin_password = designate
########################
## Storage Configuration
########################
#-----------------------
# SQLAlchemy Storage
#-----------------------
[storage:sqlalchemy]
# Database connection string - to configure options for a given implementation
# like sqlalchemy or other see below
connection = mysql://designate:designate@localhost/designate
#connection_debug = 100
#connection_trace = True
#sqlite_synchronous = True
idle_timeout = 3600
max_retries = 10
retry_interval = 10
########################
## Backend Configuration
########################
#-----------------------
# PowerDNS Backend
#-----------------------
[backend:powerdns]
connection = mysql://powerdns:powerdns@localhost/powerdns
#connection_debug = 100
#connection_trace = True
#sqlite_synchronous = True
idle_timeout = 3600
max_retries = 10
retry_interval = 10

View File

@ -1,142 +0,0 @@
[DEFAULT]
########################
## General Configuration
########################
# Show more verbose log output (sets INFO log level output)
verbose = True
# Show debugging output in logs (sets DEBUG log level output)
debug = True
# Top-level directory for maintaining designate's state.
state_path = $pybasedir/state
# Log directory
logdir = $pybasedir/log
# Driver used for issuing notifications
notification_driver = messaging
# Use "sudo designate-rootwrap /etc/designate/rootwrap.conf" to use the real
# root filter facility.
# Change to "sudo" to skip the filtering and just run the command directly
# root_helper = sudo
# RabbitMQ Config
rabbit_userid = designate
rabbit_password = designate
#rabbit_virtual_host = /
#rabbit_use_ssl = False
#rabbit_hosts = 127.0.0.1:5672
########################
## Service Configuration
########################
#-----------------------
# Central Service
#-----------------------
[service:central]
# Maximum domain name length
#max_domain_name_len = 255
# Maximum record name length
#max_record_name_len = 255
#-----------------------
# API Service
#-----------------------
[service:api]
# Address to bind the API server
api_host = 0.0.0.0
# Port to bind the API server
api_port = 9001
# Authentication strategy to use - can be either "noauth" or "keystone"
auth_strategy = noauth
# Enable API Version 1
enable_api_v1 = True
# Enabled API Version 1 extensions
enabled_extensions_v1 = diagnostics, quotas, reports, sync, touch
# Enable API Version 2
enable_api_v2 = True
# Enabled API Version 2 extensions
enabled_extensions_v2 = quotas, reports
#-----------------------
# mDNS Service
#-----------------------
[service:mdns]
#workers = None
#host = 0.0.0.0
#port = 5354
#tcp_backlog = 100
#-----------------------
# Pool Manager Service
#-----------------------
[service:pool_manager]
pool_id = 794ccc2c-d751-44fe-b57f-8894c9f5c842
#workers = None
#threshold_percentage = 100
#poll_timeout = 30
#poll_retry_interval = 2
#poll_max_retries = 3
#poll_delay = 1
#periodic_recovery_interval = 120
#periodic_sync_interval = 300
#periodic_sync_seconds = None
#cache_driver = sqlalchemy
#####################
## Pool Configuration
#####################
[pool:794ccc2c-d751-44fe-b57f-8894c9f5c842]
nameservers = f02a0c72-c701-4ec2-85d7-197b30992ce8
targets = f02a0c72-c701-4ec2-85d7-197b30992ce9
[pool_nameserver:f02a0c72-c701-4ec2-85d7-197b30992ce8]
host = 127.0.0.1
port = 53
[pool_target:f02a0c72-c701-4ec2-85d7-197b30992ce9]
masters = 127.0.0.1:5354
type = bind9
options = port: 53, host: 127.0.0.1
###################################
## Pool Manager Cache Configuration
###################################
#-----------------------
# SQLAlchemy Pool Manager Cache
#-----------------------
[pool_manager_cache:sqlalchemy]
connection = mysql://root:password@127.0.0.1/designate_pool_manager
#connection_debug = 100
#connection_trace = False
#sqlite_synchronous = True
#idle_timeout = 3600
#max_retries = 10
#retry_interval = 10
########################
## Storage Configuration
########################
#-----------------------
# SQLAlchemy Storage
#-----------------------
[storage:sqlalchemy]
# Database connection string - to configure options for a given implementation
# like sqlalchemy or other see below
connection = mysql://root:password@127.0.0.1/designate
#connection_debug = 100
#connection_trace = True
#sqlite_synchronous = True
#idle_timeout = 3600
#max_retries = 10
#retry_interval = 10

View File

@ -2,18 +2,12 @@
########################
## General Configuration
########################
# Show more verbose log output (sets INFO log level output)
verbose = True
# Show debugging output in logs (sets DEBUG log level output)
debug = True
# Top-level directory for maintaining designate's state.
state_path = $pybasedir/state
# Log directory
logdir = $pybasedir/log
# Driver used for issuing notifications
notification_driver = messaging
@ -80,35 +74,48 @@ enabled_extensions_v2 = quotas, reports
#tcp_backlog = 100
#-----------------------
# Pool Manager Service
# Worker Service
#-----------------------
[service:pool_manager]
pool_id = 794ccc2c-d751-44fe-b57f-8894c9f5c842
[service:worker]
# Whether to send events to worker instead of Pool Manager
enabled = True
#workers = None
#threads = 1000
#threshold_percentage = 100
#poll_timeout = 30
#poll_retry_interval = 2
#poll_max_retries = 3
#poll_delay = 1
#periodic_recovery_interval = 120
#periodic_sync_interval = 300
#periodic_sync_seconds = None
#cache_driver = sqlalchemy
#poll_retry_interval = 15
#poll_max_retries = 10
#poll_delay = 5
notify = True
###################################
## Pool Manager Cache Configuration
###################################
#-----------------------
# SQLAlchemy Pool Manager Cache
# Producer Service
#-----------------------
[pool_manager_cache:sqlalchemy]
connection = mysql+pymysql://root:password@127.0.0.1/designate_pool_manager?charset=utf8
#connection_debug = 100
#connection_trace = False
#sqlite_synchronous = True
#idle_timeout = 3600
#max_retries = 10
#retry_interval = 10
[service:producer]
#workers = None
#threads = 1000
#enabled_tasks = None
#export_synchronous = True
#------------------------
# Deleted domains purging
#------------------------
[producer_task:domain_purge]
#interval = 3600 # 1h
#batch_size = 100
#time_threshold = 604800 # 7 days
#------------------------
# Delayed zones NOTIFY
#------------------------
[producer_task:delayed_notify]
#interval = 5
#------------------------
# Worker Periodic Recovery
#------------------------
[producer_task:worker_periodic_recovery]
#interval = 120
########################
## Storage Configuration

View File

@ -46,7 +46,6 @@ Install Guides
Install Guides are on the main `OpenStack Install Guide Site <https://docs.openstack.org/project-install-guide/dns/ocata/>`_
Upgrade Guides
--------------
@ -80,7 +79,7 @@ Developer Documentation
:maxdepth: 1
sourcedoc
install/ubuntu-dev
ubuntu-dev
devstack
tempest
related

View File

@ -31,7 +31,7 @@ This guide will walk you through setting up a typical development environment fo
using BIND9 as the DNS backend and MySQL as the storage backend. For a more complete discussion on
installation & configuration options, please see :ref:`architecture`.
For this guide you will need access to an Ubuntu Server (14.04).
For this guide you will need access to an Ubuntu Server (16.04).
.. _Development Environment:
@ -48,11 +48,11 @@ Installing Designate
::
$ sudo apt-get update
$ sudo apt-get install python-pip python-virtualenv libssl-dev libffi-dev git
$ sudo apt-get build-dep python-lxml
$ sudo apt update
$ sudo apt install -y python-pip python-virtualenv libssl-dev libffi-dev git
$ sudo apt build-dep -y python-lxml
2. Clone the Designate repo from GitHub
2. Clone the Designate repo
::
@ -84,13 +84,9 @@ Installing Designate
5. Install Designate and its dependencies
.. note::
If you run into the error: Installed distribution pbr 1.1.1 conflicts with requirement pbr>=0.6,!=0.7,<1.0, try doing pip install pbr==0.11.0
::
$ pip install -r requirements.txt -r test-requirements.txt
$ python setup.py develop
$ pip install -e .
6. Change directories to the etc/designate folder.
@ -110,21 +106,13 @@ Installing Designate
$ cp -a rootwrap.conf.sample rootwrap.conf
8. Make the directory for Designates log files
::
$ mkdir -p ../../log
9. Make the directory for Designates state files
8. Make the directory for Designates state files
::
$ mkdir -p ../../state
Configuring Designate
======================
@ -140,7 +128,7 @@ Create the designate.conf file
Copy or mirror the configuration from this sample file here:
.. literalinclude:: ../examples/basic-config-sample.conf
.. literalinclude:: ./examples/basic-config-sample.conf
:language: ini
@ -151,7 +139,7 @@ Install the RabbitMQ package
::
$ sudo apt-get install rabbitmq-server
$ sudo apt install -y rabbitmq-server
Create a user:
@ -176,7 +164,7 @@ Install the MySQL server package
::
$ sudo apt-get install mysql-server-5.5
$ sudo apt install -y mysql-server
If you do not have MySQL previously installed, you will be prompted to change the root password.
@ -199,7 +187,6 @@ Create the Designate tables
Enter password: <enter your password here>
mysql> CREATE DATABASE `designate` CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> CREATE DATABASE `designate_pool_manager` CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> exit;
@ -207,7 +194,7 @@ Install additional packages
::
$ sudo apt-get install libmysqlclient-dev
$ sudo apt install -y libmysqlclient-dev
$ pip install pymysql
@ -221,7 +208,7 @@ Install the DNS server, BIND9
::
$ sudo apt-get install bind9
$ sudo apt install -y bind9
Update the BIND9 Configuration
@ -248,16 +235,16 @@ Disable AppArmor for BIND9
::
$ sudo touch /etc/apparmor.d/disable/usr.sbin.named
$ sudo service apparmor reload
$ sudo systemctl reload apparmor
Restart BIND9:
::
$ sudo service bind9 restart
$ sudo systemctl restart bind9
Create and Import pools.yml File
================================
Create and Import pools.yaml File
=================================
.. index::
double: install; pools
@ -270,21 +257,14 @@ Create the pools.yaml file
Copy or mirror the configuration from this sample file here:
.. literalinclude:: ../examples/basic-pools-sample.yaml
.. literalinclude:: ./examples/basic-pools-sample.yaml
:language: yaml
Import the pools.yaml file into Designate
::
$ designate-manage pool update --file pools.yaml
Initialize & Start the Central Service
======================================
Initialize the Database
=======================
.. index::
double: install; central
double: install; database
Sync the Designate database.
@ -292,6 +272,13 @@ Sync the Designate database.
$ designate-manage database sync
Start the Central Service
=========================
.. index::
double: install; central
Start the central service.
::
@ -301,93 +288,41 @@ Start the central service.
You'll now be seeing the log from the central service.
Initialize & Start the API Service
==================================
Initialize Pools Information
============================
Import the pools.yaml file into Designate. It is important that
``designate-central`` is started before invoking this command
::
$ designate-manage pool update --file pools.yaml
Start the other Services
========================
.. index::
double: install; api
double: install; services
Open up a new ssh window and log in to your server (or however youre communicating with your server).
Open up some new ssh windows and log in to your server (or open some new screen/tmux sessions).
::
$ cd openstack/designate
If Designate was installed into a virtualenv, make sure your virtualenv is sourced
::
$ source .venv/bin/activate
Start the API Service
Start the other services
::
$ designate-api
Youll now be seeing the log from the API service.
Initialize & Start the Pool Manager Service
===========================================
.. index::
double: install; pool-manager
Open up a new ssh window and log in to your server (or however youre communicating with your server).
::
$ cd openstack/designate
If Designate was installed into a virtualenv, make sure your virtualenv is sourced
::
$ source .venv/bin/activate
Sync the Pool Manager's cache:
::
$ designate-manage pool-manager-cache sync
Start the pool manager service:
::
$ designate-pool-manager
You'll now be seeing the log from the Pool Manager service.
Initialize & Start the MiniDNS Service
======================================
.. index::
double: install; minidns
Open up a new ssh window and log in to your server (or however youre communicating with your server).
::
$ cd openstack/designate
If Designate was installed into a virtualenv, make sure your virtualenv is sourced
::
$ source .venv/bin/activate
Start the minidns service:
::
$ designate-mdns
$ designate-worker
$ designate-producer
You'll now be seeing the log from the MiniDNS service.
Youll now be seeing the logs from the other services.
Exercising the API
==================
@ -395,19 +330,38 @@ Exercising the API
.. note:: If you have a firewall enabled, make sure to open port 53, as well as Designate's default port (9001).
Using a web browser, curl statement, or a REST client, calls can be made to the
Designate API using the following format where "api_version" is either v1 or v2
and "command" is any of the commands listed under the corresponding version at :ref:`rest`
Designate API. You can find the various API calls on the api-ref_ document.
For example:
::
http://IP.Address:9001/api_version/command
$ curl 127.0.0.1:9001/v2/zones -H 'Content-Type: application/json' --data '
{
"name": "example.com.",
"email": "example@example.com"
}'
{"status": "PENDING",.....
$ curl 127.0.0.1:9001/v2/zones
{"zones": [{"status": "ACTIVE",.....
The ``ACTIVE`` status shows that the zone propagated. So you should be able to perform a DNS query and
see it:
::
$ dig @127.0.0.1 example.com SOA +short
ns1-1.example.org. example.example.com. 1487884120 3531 600 86400 3600
You can find the IP Address of your server by running
::
curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1
A couple of notes on the API:
If you have Keystone set up, you can use it by configuring the ``[keystone_authtoken]`` section and changing
the ``auth_strategy = keystone`` in the ``service:api`` section. This will make it easier to use clients
like the ``openstack`` CLI that expect Keystone.
- Before Domains are created, you must create a server (/v1/servers).
.. _api-ref: https://developer.openstack.org/api-ref/dns/