Code Monkey home page Code Monkey logo

ore's Introduction

Openstack Research Environment

The MOC Openstack Research Environment is a two-pronged suite of testing tools for MOCers. It consists of a development environment (a single-node modified DevStack environment for quickly* testing changes and running smaller experiments) and a production-like environment (a multi-node modified TripleO environment for testing changes and running experiments at production-level scale).


Development Environment

DevStack is a collection of scripts designed to quickly deploy an OpenStack environment on a single node for testing purposes. MOC DevStack is a patch designed to be compatible with CentOS and add some functionality.

Launch Instructions:

  • In Kaizen, launch a VM with the CentOS 7.5 image and at least m1.large flavor

    Note that VM launch may take up to 5 minutes. You can monitor the progress in the log in Kaizen.

    VM status will be active, but it will be patching in the background. You can check the instance log on Kaizen to see when this is complete

  • After VM launch complete, SSH to the machine as stack user ssh stack@<devstack machine floating IP>

  • Enter the devstack directory: cd devstack

  • Edit local.conf as desired

  • Install + run DevStack: ./stack.sh

  • *Installation may take up to 45 minutes (enabled plugins may increase install time)

If you fork this repo, make sure to edit single_node_devstack.yml to point to your fork. Otherwise, it will continue to download the patch from CCI-MOC


Local.conf:

local.conf

located on DevStack machine at: /opt/stack/devstack/local.conf

Usage:

  • set the openstack passwords (default is "Devstack1" for admin user)
  • specify the repo/branch/commit for services
  • enable or disable plugins like rally, osprofiler, etc

Repos, Branches, and Commits (oh my!):

To use a specific repo, branch, and/or commit, before running stack.sh edit local.conf to add:

$SERVICE_REPO=

$SERVICE_BRANCH=

$SERVICE_COMMIT=

After running stack.sh, the repo/branch/commit can be modified for an individual service using git commands in the service directory at /opt/stack/$SERVICE as indicated below.


Openstack Services:

Workflow for testing changes to Openstack source code:

  1. Specify your custom git repo in local.conf as indicated above
  2. Install DevStack ./stack.sh
  3. Make changes to your openstack source code in the repo
  4. git pull changes into the directory on DevStack machine
  5. Restart DevStack: ./unstack.sh and ./stack.sh

Another option is to edit the code on the machine itself. This may be advantageous for testing smaller changes if you do not want to go through the git workflow. Source code for openstack services is located in /opt/stack/$SERVICE. After making a change, restart all openstack services by running: sudo systemctl restart "devstack@*"

You can also restart individual services after making a change with similar syntax. More info: https://docs.openstack.org/devstack/latest/development.html

note that these changes are in checked out git trees, so if you do not commit changes using the second method, your work may be overwritten by subsequent DevStack runs

Further reading on openstack services in devstack: https://docs.openstack.org/devstack/latest/systemd.html


Modifications to DevStack:

  • after cloning requirements repo, change python-libvirt to 3.9 in upper-constraints.txt (this is because CentOS 7 ships with python-libvirt 3.9 but devstack pike sets upper limit of python-libvirt 3.5)
  • implement fix in devstack/inc/python to not uninstall when offline mode is enabled
  • enable offline mode after a successful install of devstack in order to avoid downloading new (and incompatible) versions of software
  • change /inc/$SERVICE to use git reset to allow choosing a specific commit

Production-Like Environment

WIP

ore's People

Contributors

emreates avatar huzefamandvi avatar naved001 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

emreates docc-lab

ore's Issues

Neutron.conf settings enabled trace_sqlalchemy

It's possible this may have just been my system because Emre did not have this problem, but in my newest ORE, /etc/neutron/neutron.conf had neutron.db tracepoints enabled with the line trace_sqlalchemy = True, which gave me really wonky results on the traces until we figured it out.

I edited it to say trace_sqlalchemy = False and restarted with sudo systemctl restart devstack@* and then it worked. But I didn't edit that file to begin with, so I'm not sure why this happened. I brought up the ORE the same way as before, following the instructions in the README.

SSH key configuration

Why do we need to insert our ssh keys info config.yml now, instead of copying /home/centos/.ssh?

In /home/centos openstack automatically places the selected security key, and if we copy it to /opt/stack, we can ssh directly to the stack user. Is this version more secure? Did the other version break for some reason?

OSProfiler is not getting traces from every service

This is mostly up to me to fix, but I'm writing some progress here. Any help is most welcome.

Steps to reproduce

  1. Install devstack according to the instructions
  2. Source openrc with parameters admin admin
  3. Run an openstack command - I used openstack --os-profile Devstack1 server create --flavor m1.tiny --image cirros-0.3.5-x86_64-disk test_server_1
  4. Retrieve the trace using osprofiler trace show --json --connection-string redis://localhost:6379 $TRACE_ID

Result

The trace only contains traces from glance after these operations. I've also checked redis using redis-cli and then KEYS osprofiler* and the traces match - there are only 8 entries for the VM create command, all from glance.

Additional Info

After devstack is running, every service can be restarted using sudo systemctl restart devstack@*, which fixes something in keystone. After this, I can get keystone traces as well, but still nothing from nova.

Have to manually rebuild patch

Because we are using a git patch, we must manually rebuild the patch each time we want to modify devstack. Instead, we should just download the files directly from this repo. This also centralizes everything into one repo, rather than using a different modified devstack to build the patch.

Commits are not working

Even though the commits are not commented out in local.conf, the pulled repos have different commits. I think this might also be the reason for #24.

Issue with libvirt breaks ORE

Trying to ./stack.sh in the devstack directory using the current single_node_devstack.yml file on s-large flavor Centos created Dec. 18 produces the attached error (the text file includes the last part of output, not all the output).
ORE_error.txt

The solutions mentioned here (i.e. upgrading pip or issuing virtualenv ../requirements/.venv/) do not work:
https://askubuntu.com/questions/1040238/openstack-devstack-installation-ubuntu-16-04

This part of the ORE readme looks relevant:

after cloning requirements repo, change python-libvirt to 3.9 in upper-constraints.txt (this is because CentOS 7 ships with python-libvirt 3.9 but devstack pike sets upper limit of python-libvirt 3.5)

However, manually changing this also did not work. upper-constraints.txt appears to be 3 different files:

./requirements/openstack_requirements/tests/files/upper-constraints.txt
./requirements/.venv/lib/python2.7/site-packages/openstack_requirements/tests/files/upper-constraints.txt
./requirements/upper-constraints.txt

These files do not have a python-libvirt field, only a libvirt-python field. I did update that field to libvirt-python===3.9.0 and ran ./stack.sh in /devstack again. But I got the same error as previously.

OSProfiler patch doesn't work

Pull request #16 doesn't fix the issue, after a fresh VM creation, the OSprofiler version installed is still 1.11, not stable/queens, even though /opt/stack/osprofiler is queens.

Doing sudo pip install in /opt/stack/osprofiler (without anything else), and then restarting services fixes this issue.

osprofiler update

osprofiler can support jaeger in the master branch, so I'm trying to create an ORE with the master version of osprofiler.

So far, I tried to change local.conf to include OSPROFILER_BRANCH and OSPROFILER_REPO, with no luck (the old version of osprofiler is fetched). I'll try it more systematically tomorrow and update any progress over here.

Have to repeatedly source openrc

I noticed that in order to be able to use openstack I have to run source /opt/stack/devstack/openrc admin admin every time I ssh to the instance I created with this devstack, and I wanted this to run automatically instead.

So I altered /opt/stack/devstack/openrc to have admin as default for both OS_USERNAME and OS_PROJECT_NAME and stuck a single line script into /etc/profile.d/ that runs source /opt/stack/devstack/openrc admin admin &> /dev/null on start-up of the shell.

Is there a way to make these changes part of the default configuration for the ORE, or do these types of changes reside in the image we launch from (rather than the config .yml files or patches) and therefore we can't really alter them?

Obviously this is pretty low priority.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.