Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate installation of Galah. #389

Open
2 tasks
itsjohncs opened this issue Nov 19, 2013 · 5 comments
Open
2 tasks

Automate installation of Galah. #389

itsjohncs opened this issue Nov 19, 2013 · 5 comments

Comments

@itsjohncs
Copy link
Contributor

Galah will be installed by the machine's native package manager (ex: Yum on CentOS). Galah Group will host and maintain repositories that these package managers can access. The scope of this issue is more focused however.

Upon successful completion of this issue, the following tasks will be automated.

  • Generating RPM's for Galah (fpm).
  • [ ] Configuring Galah and its dependencies (Python scripts).
  • Bringing up a development environment running CentOS 6 with Galah installed and operational (vagrant + ansible). Different versions of Galah and dependencies need to be supported.

The end-user (system administrator) will be able to install Galah from the RPM. Install the dependencies (with some assistance from the Galah configuration scripts) using Yum. Configure them, and fire it off without much trouble.

The developers will be able to easily bring up a development environment without trouble.

The automated testing will be able to bring up VMs running Galah, ready for testing, by just invoking Vagrant.

@itsjohncs
Copy link
Contributor Author

The configuration scripts should be capable of installing the correct repositories for dependencies (like Nginx for example). I imagine an invocation along the lines of...

get-repos nginx mongodb zeromq redis

Which would add the correct repositories in the repos.d directory. Actually invoking Yum should be left to the system administrators.

@itsjohncs
Copy link
Contributor Author

The command above seems unecessary since the sysadmin shops will probably be using some kind of configuration management and they'll want to add the repos using those tools rather than the scripts. At the very least there's not a need for them right now. Example configurations and proper documentation will be more useful than any configuration scripts. Until I am convinced otherwise by myself or others dropping the configuration script task.

Provisioning for vagrant will be done using Ansible rather than shell for simplicity (all it really needs to do is do some work with yum).

@itsjohncs
Copy link
Contributor Author

Below are the only dependencies of Galah v0.3 (as currently known):

  • Web Server: Nginx or Apache
  • Database: MongoDB
  • Message Queue: Redis

Python dependencies are not included.

@itsjohncs
Copy link
Contributor Author

With the completion of #396 a huge portion of the third task is completed ("Bringing up a development environment [...]"). Reworking the components to fit the new architecture is next (leveraging Redis and the base module).

@itsjohncs
Copy link
Contributor Author

These are the steps I took to install galah on a fresh vagrant box. Should be easy enough to automate whenever I get around to it:

  1. Install virtualenv
  2. Make virtualenv at /opt/galah-env
  3. With virtualenv pip, pip install -r dev-requirements.py
  4. Make /etc/galah directory
  5. Make /etc/galah/galah.config
  6. wget http://download.openvz.org/template/precreated/centos-6-x86_64.tar.gz into /vz/templace/cache

Config file used was:

config = {
    "core/REDIS_HOST": "localhost",
    "core/REDIS_PORT": 6379,
    "core/MACHINE_ID": u"dev",

    "vmfactory/vz/VZCTL_PATH": "/usr/sbin/vzctl",
    "vmfactory/vz/VZLIST_PATH": "/usr/sbin/vzlist",
    "vmfactory/vz/ID_RANGE": [100, 200],
    "vmfactory/vz/ALLOCATE_IP": (lambda id: "192.168.1.{0}".format(id)),
    "vmfactory/vz/OS_TEMPLATE": "centos-6-x86_64",
    "vmfactory/vz/CONTAINER_DIRECTORY": "/vz/root/",
    "vmfactory/vz/BOOTSTRAPPER_DIRECTORY": "/root",
    "vmfactory/GUEST_USER": "root",
    "vmfactory/GUEST_GROUP": "root",
    "vmfactory/SUBMISSION_DIRECTORY": "/root/submission",
    "vmfactory/HARNESS_DIRECTORY": "/root/harness" 
}

Hopefully I'll add some additional logging information at some point.

@itsjohncs itsjohncs removed this from the 0.3 Backend Alpha Release milestone Aug 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant