Friday, February 26, 2016

[Fuel] To build up Fuel Nailgun developing environment

  Well, I try to build up Fuel Nail Gun developing environment on my Debian 7 virtualbox VM. All my reference document is this nailgun.
  Although this document seems to use Ubuntu 12.04/14.04, but I still insist to build on Debian 7 due to my personal persistence. Here we go:

  • Install nailgun developing environment
sudo apt-get install --yes postgresql postgresql-server-dev-all
sudo sed -ir 's/peer/trust/' /etc/postgresql/9.1/main/pg_hba.conf
sudo service postgresql restart
sudo -u postgres psql -c "CREATE ROLE nailgun WITH LOGIN PASSWORD 'nailgun'"
sudo -u postgres createdb nailgun

sudo apt-get install --yes python-dev python-pip
sudo pip install virtvualenv virtualewrapper
. /usr/local/bin/virtualenvwrapper.sh  # you can save this to .bashrc
mkvirtualenv fuel # you can use any name instead of 'fuel'
workon fuel  # command selects the particular environment

sudo apt-get install --yes git
git clone https://github.com/openstack/fuel-web.git
cd fuel-web
pip install --allow-all-external -r nailgun/test-requirements.txt
cd nailgun
python setup.py develop
sudo mkdir /var/log/nailgun
sudo chown -R `whoami`.`whoami` /var/log/nailgun
sudo chmod -R a+w /var/log/nailgun

sudo apt-get remove --yes nodejs nodejs-legacy
sudo apt-get install --yes software-properties-common
sudo add-apt-repository --yes ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install --yes nodejs

# This is only for Debian to do installing NPM
git clone https://github.com/joyent/node.git
cd node
#Now, if you require a specific version of Node:
git tag # Gives you a list of released versions
git checkout v0.4.12
# Then compile and install Node like this:
./configure
make
sudo make install
cd ~/fuel-web
sudo npm install -g gulp sudo chown -R `whoami`.`whoami` ~/.npm cd nailgun
# To install dependency packages for using Fuel UI
# Then compile and install Node like this:
npm install

  • Start the nailgun environment
. /usr/local/bin/virtualenvwrapper.sh
workon fuel
cd fuel-web/nailgun
./manage.py syncdb
./manage.py loaddefault # It loads all basic fixtures listed in settings.yaml
./manage.py loaddata nailgun/fixtures/sample_environment.json  # Loads fake nodes

python manage.py run -p 8000 --fake-tasks

now, we can login Fuel UI by http://localhost:8000



  • Install the Fuel8.0 client
Use Fuel API to program your installation tool 

  • Other reference URLs:
Using Fuel CLI
https://docs.mirantis.com/openstack/fuel/fuel-8.0/user-guide.html#using-fuel-cli

Fuel Plugin Catalog
https://www.mirantis.com/products/openstack-drivers-and-plugins/fuel-plugins/

Fuel Reference Architecture
https://docs.mirantis.com/openstack/fuel/fuel-7.0/reference-architecture.html

fuel-specs/specs/8.0/
https://github.com/openstack/fuel-specs/tree/master/specs/8.0

OpenStack/fuel-dev-tools
https://github.com/openstack/fuel-dev-tools

http://www.yet.org/2015/10/mos7-reducedfootprint/

No comments: