I reworked my OpenStack API based cluster builder Ossipee last weekend. It makes heavy use of dependency resolution now, and breaks apart the super-base class into properly scoped components.
Continue reading
Category Archives: Python
Rippowam
Ossipee started off as OS-IPA. As it morphed into a tool for building development clusters,I realized it was more useful to split the building of the cluster from the Install and configuration of the application on that cluster. To install IPA and OpenStack, and integrate them together, we now use an ansible-playbook called Rippowam.
Ossipee
OpenStack is a big distributed system. FreeIPA is designed for security in distributed system. In order to develop and test each of them, separately or together, I need a distributed system. Virtualization has been a key technology for making this kind of work possible. OpenStack is great of managing virtualization. Added to that is the benefits found when we “fly our own airplanes.” Thus, I am using OpenStack to develop OpenStack.
Debugging OpenStack with rpdb
OpenStack has many different code bases. Figuring out how to run in a debugger can be maddening, especially if you are trying to deal with Eventlet and threading issues. Adding HTTPD into the mix, as we did for Keystone, makes it even trickier. Here’s how I’ve been handling things using the remote pythong debugger (rpdb).
Compressed tokens
The maximum header size between a HTTPD and an WSGI process is fixed at 8 Kilobytes. With a sufficiently large catalog, the token in PKI format won’t fit. Compression seems like it would be such an easy solution. But the there is a Hobgoblin or two hiding in the shadows.
Continue reading
A SQL upgrade script in Keystone
The SQL migration mechanism in Keystone is interesting enough to warrant some attention. If you need to modify the SQL database in any of the Open Stack projects, you are going to use a similar approach. Here is a step by step I have recorded of a SQL upgrade script I am writing for a feature in Keystone.
Continue reading
Installing RPM Build Dependencies
If you ever want to build and RPM, you need to make sure that the things it requires are installed. These are listed in the SPEC file on lines that begin with BuildRequires. Installing these by hand is time consuming enough that it should be automated. Here’s a first hack in Python.
#!/usr/bin/python
import sys
import re
build_re = re.compile('BuildRequires:.*')
compare_re = re.compile('.*=.*')
def main():
if (len(sys.argv) > 1):
spec = open(sys.argv[1])
for line in spec:
if build_re.match(line):
for token in line.rsplit(" "):
if build_re.match(token):
continue
if compare_re.match(token):
break
token = token.rstrip(" ,\n\r")
if len(token) > 0:
print token
if __name__ == "__main__":
main()
To use it, save in a file called buildreqs.py and run:
sudo yum install `./buidreqs.py ~/rpmbuild/SPECS/krb5.spec`
Dependency Injection in Python
Object oriented design principals are not language specific. While there is variation from language to language on details of implementations, and some techniques are not appropariate to all languages, for the most part, good design is good design.
Continue reading
FreeIPA Keystone LDAP Store
The next interim release of Openstack Keystone will once again have LDAP support. I am developing against OpenLDAP to start, as that is what the LDAP support has been based on in the past. However, the directory server that backs FreeIPA works perfectly well, and provides a backend that allows for Keystone support.
Checking My Work On Eight Tone Scales
My calculations on Eight Tone Scales was way too manually intensive for me to trust that I got it right. I should check my work.
