From e2b6c7c096af3a4267315e3f646824fea1ababbc Mon Sep 17 00:00:00 2001 From: Luis Gervaso Date: Mon, 10 Jun 2013 02:17:57 +0200 Subject: [PATCH] sync both linux and mac documentation Change-Id: Id93d2035f72da036316733924f6f8b0d34ff66a9 --- doc/source/install/macos.rst | 117 ++++++++++++++++++++-------------- doc/source/install/manual.rst | 90 +++++++++++++++----------- 2 files changed, 124 insertions(+), 83 deletions(-) diff --git a/doc/source/install/macos.rst b/doc/source/install/macos.rst index 13c3a76..23b98e8 100644 --- a/doc/source/install/macos.rst +++ b/doc/source/install/macos.rst @@ -34,60 +34,75 @@ Common Steps 1. Install system package dependencies:: - $ brew install python --framework - $ brew install rabbitmq + $ brew install python --framework + $ brew install rabbitmq -.. note:: - To have launchd start rabbitmq at login: + .. note:: + + To have launchd start rabbitmq at login: ln -sfv /usr/local/opt/rabbitmq/*.plist ~/Library/LaunchAgents - Then to load rabbitmq now: + Then to load rabbitmq now: launchctl load ~/Library/LaunchAgents/homebrew.mxcl.rabbitmq.plist - Or, if you don't want/need launchctl, you can just run: + Or, if you don't want/need launchctl, you can just run: rabbitmq-server - $ rabbitmq-server + Start RabbitMQ:: - RabbitMQ 3.1.1. Copyright (C) 2007-2013 VMware, Inc. - ## ## Licensed under the MPL. See http://www.rabbitmq.com/ - ## ## - ########## Logs: /usr/local/var/log/rabbitmq/rabbit@localhost.log - ###### ## /usr/local/var/log/rabbitmq/rabbit@localhost-sasl.log - ########## - Starting broker... completed with 7 plugins. + $ rabbitmq-server - $ brew install mysql + RabbitMQ 3.1.1. Copyright (C) 2007-2013 VMware, Inc. + + ## ## Licensed under the MPL. See http://www.rabbitmq.com/ + ## ## + ########## Logs: /usr/local/var/log/rabbitmq/rabbit@localhost.log + ###### ## /usr/local/var/log/rabbitmq/rabbit@localhost-sasl.log + ########## + + Starting broker... completed with 7 plugins. 2. Clone the BillingStack repo off of Github:: $ git clone https://github.com/billingstack/billingstack.git $ cd billingstack -3. Setup virtualenv and Install BillingStack and it's dependencies:: +3. Setup virtualenv and Install BillingStack and it's dependencies + + .. note:: -.. note:: This is to not interfere with system packages etc. - $ pip install virtualenv - $ python tools/install_venv.py - $ . .venv/bin/activate - $ python setup.py develop + :: -.. note:: - ValueError: unknown locale: UTF-8. To fix it you will have to set these environment variables in your ~/.profile or ~/.bashrc manually: - .profile - export LANG=en_US.UTF-8 - export LC_ALL=en_US.UTF-8 + $ pip install virtualenv + $ python tools/install_venv.py + $ . .venv/bin/activate + $ python setup.py develop - Copy sample configs to usable ones, inside the `etc` folder do:: + .. warning:: - $ sudo cp -r etc/billingstack /etc - $ cd /etc/billingstack - $ sudo ls *.sample | while read f; do cp $f $(echo $f | sed "s/.sample$//g"); done + ValueError: unknown locale: UTF-8. + + To fix it you will have to set these environment variables in your ~/.profile or ~/.bashrc manually: + + export LANG=en_US.UTF-8 + export LC_ALL=en_US.UTF-8 + + Copy sample configs to usable ones, inside the `etc` folder do + + + :: + + $ sudo cp -r etc/billingstack /etc + $ cd /etc/billingstack + $ sudo ls *.sample | while read f; do cp $f $(echo $f | sed "s/.sample$//g"); done + + .. note:: -.. note:: Change the wanted configuration settings to match your environment, the file is in the `/etc/billingstack` folder:: + :: + $ vi /etc/billingstack/billingstack.conf @@ -103,25 +118,31 @@ Installing Central 1. See `Common Steps`_ before proceeding. -2. Create the DB for :term:`central`:: +2. Create the DB for :term:`central` - $ python tools/resync_billingstack.py + :: -3. Now you might want to load sample data for the time being:: + $ python tools/resync_billingstack.py - $ python tools/load_samples.py +3. Now you might want to load sample data for the time being -4. Start the central service:: + :: - $ billingstack-central + $ python tools/load_samples.py - ... +4. Start the central service - 2013-06-09 03:51:22 DEBUG [amqp] Open OK! - 2013-06-09 03:51:22 DEBUG [amqp] using channel_id: 1 - 2013-06-09 03:51:22 DEBUG [amqp] Channel open - 2013-06-09 03:51:22 INFO [billingstack.openstack.common.rpc.common] Connected to AMQP server on localhost:5672 - 2013-06-09 03:51:22 DEBUG [billingstack.openstack.common.rpc.service] Creating Consumer connection for Service central + :: + + $ billingstack-central + + ... + + 2013-06-09 03:51:22 DEBUG [amqp] Open OK! + 2013-06-09 03:51:22 DEBUG [amqp] using channel_id: 1 + 2013-06-09 03:51:22 DEBUG [amqp] Channel open + 2013-06-09 03:51:22 INFO [...] Connected to AMQP server on localhost:5672 + 2013-06-09 03:51:22 DEBUG [...] Creating Consumer connection for Service central Installing the API @@ -135,10 +156,12 @@ Installing the API 1. See `Common Steps`_ before proceeding. -2. Start the API service:: +2. Start the API service - $ billingstack-api + :: - ... + $ billingstack-api - 2013-06-09 03:52:31 INFO [eventlet.wsgi] (2223) wsgi starting up on http://0.0.0.0:9091/ \ No newline at end of file + ... + + 2013-06-09 03:52:31 INFO [eventlet.wsgi] (2223) wsgi starting up on http://0.0.0.0:9091/ \ No newline at end of file diff --git a/doc/source/install/manual.rst b/doc/source/install/manual.rst index 0b52285..0346de7 100644 --- a/doc/source/install/manual.rst +++ b/doc/source/install/manual.rst @@ -28,33 +28,49 @@ Common Steps .. note:: The below operations should take place underneath your /etc folder. -1. Install system package dependencies (Ubuntu):: +1. Install system package dependencies (Ubuntu) - $ apt-get install python-pip python-virtualenv - $ apt-get install rabbitmq-server mysql-server - $ apt-get build-dep python-lxml + :: -2. Clone the BillingStack repo off of Github:: + $ apt-get install python-pip + $ apt-get install rabbitmq-server - $ git clone https://github.com/billingstack/billingstack.git - $ cd billingstack +2. Clone the BillingStack repo off of Github -3. Setup virtualenv:: + :: -.. note:: - This is to not interfere with system packages etc. + $ git clone https://github.com/billingstack/billingstack.git + $ cd billingstack - $ virtualenv --no-site-packages .venv - $ . .venv/bin/activate +3. Setup virtualenv and Install BillingStack and it's dependencies -4. Install BillingStack and it's dependencies:: + .. note:: - $ pip install -rtools/setup-requires -rtools/pip-requires -rtools/pip-options - $ python setup.py develop + This is to not interfere with system packages etc. + :: - Copy sample configs to usable ones, inside the `etc` folder do:: + $ pip install virtualenv + $ python tools/install_venv.py + $ . .venv/bin/activate + $ python setup.py develop - $ ls *.sample | while read f; do cp $f $(echo $f | sed "s/.sample$//g"); done + + Copy sample configs to usable ones, inside the `etc` folder do + + :: + + $ sudo cp -r etc/billingstack /etc + $ cd /etc/billingstack + $ sudo ls *.sample | while read f; do cp $f $(echo $f | sed "s/.sample$//g"); done + + .. note:: + + Change the wanted configuration settings to match your environment, the file + is in the `/etc/billingstack` folder + + :: + + $ vi /etc/billingstack/billingstack.conf Installing Central @@ -69,26 +85,31 @@ Installing Central 1. See `Common Steps`_ before proceeding. -2. Configure the :term:`central` service:: +2. Create the DB for :term:`central` - Change the wanted configuration settings to match your environment, the file - is in the `etc` folder:: + :: - $ vi etc/billingstack.conf + $ python tools/resync_billingstack.py - Refer to the configuration file for details on configuring the service. +3. Now you might want to load sample data for the time being -3. Create the DB for :term:`central`:: + :: - $ python tools/resync_billingstack.py + $ python tools/load_samples.py -4. Now you might want to load sample data for the time being:: +4. Start the central service - $ python tools/dev_samples.py + :: -5. Start the central service:: + $ billingstack-central - $ billingstack-central + ... + + 2013-06-09 03:51:22 DEBUG [amqp] Open OK! + 2013-06-09 03:51:22 DEBUG [amqp] using channel_id: 1 + 2013-06-09 03:51:22 DEBUG [amqp] Channel open + 2013-06-09 03:51:22 INFO [...] Connected to AMQP server on localhost:5672 + 2013-06-09 03:51:22 DEBUG [...] Creating Consumer connection for Service central Installing the API @@ -102,15 +123,12 @@ Installing the API 1. See `Common Steps`_ before proceeding. -2. Configure the :term:`api` service:: +2. Start the API service - Change the wanted configuration settings to match your environment, the file - is in the `etc` folder:: + :: - $ vi billingstack.conf + $ billingstack-api - Refer to the configuration file for details on configuring the service. + ... -3. Start the API service:: - - $ billingstack-api \ No newline at end of file + 2013-06-09 03:52:31 INFO [eventlet.wsgi] (2223) wsgi starting up on http://0.0.0.0:9091/ \ No newline at end of file