Adding "Edit on Github"

Though the procedure for doing this is straight-forward enough, it was difficult for me to find any instructions on how to do this -- so I thought I’d write some! What we would like to accomplish is to go from this:

page source
To this:
edit on github

To do this, open up ‘conf.py’, and find where you define ‘html_theme’. I did this with the default theme -- I’m sure it works with other themes as well, but the mileage may vary. Below that, you want to add the following:

html_context = {
‘display_github’: True,
‘github_user’: ‘Your username’,
‘github_repo’: ‘Repo name’,
‘github_version’: ‘Branch name’,
‘conf_py_path’:  ‘/path to your conf.py from where you compile your site/’
‘source_suffix’: ‘suffix of your content files’
}

And then you’re done! A sparkly new ‘edit on github’ link should replace the ‘view page source’ link.

Read more

A Successful DevOps DayCamp

Over 100 students and community members attended the Open Source Lab’s DevOps DayCamp in the Kelley Engineering Center at Oregon State University on Saturday, Oct. 11.

DevOps DayCamp, a new event this year, was the kick-off for DevOps BootCamp, an extracurricular training program in its second year that takes place throughout the school year for OSU students and community members interested in DevOps. DayCamp is a dual-track event designed to accommodate varying levels of DevOps experience. Tracks consisted of a beginner track and an advanced track, with one joint session for all experience levels.

The beginner track guided less experienced attendees in getting started through introductory and workshop sessions on the basics of DevOps. Led by the OSL staff, beginner attendees received instruction on some basic tools of DevOps, including Linux, the terminal and IRC. The sessions set beginners up for a successful DevOps BootCamp experience.

Read more

Using Variables in a Custom Drupal Theme

At the Open Source Lab we host many of our sites as a Drupal multisite. This means that we have several instances of Drupal using the same theme, and then we can populate each site with different content as needed (for instance, cass.oregonstate.edu and osuosl.org would be different websites with different messages, but with Drupal they can look and act the same. Pretty neat!). Since not all of our sites are used by the OSL (i.e. the Center for Applied Systems and Software), I recently needed to make our logo and organization name into variables so that the user could just upload an image and fill in a text box to customize the site theme to their organization. Luckily, Drupal makes my job pretty easy.

Read more

My Experiences with Openstack

In the simplest of terms, OpenStack is a massive undertaking. The goal of OpenStack is to fit just about every use case imaginable. This goal brings with it a daunting list of configuration options and requires a larger understanding of networking and virtualization systems. Couple that with cryptic error messages, and this makes for a system that can easily crush a newbie's confidence and cause them to scrap the system altogether. Luckily, there are some projects out there trying to lower the entry bar and get more people introduced to OpenStack. Two of the projects most referred to are DevStack (which the OpenStack developers actually use for development and testing) and RDO Packstack from RedHat.

Read more

DevOps DayCamp

The Open Source Lab will host the new DevOps DayCamp on Saturday, October 11, in the Kelley Engineering Center from 9 a.m. until 6 p.m. The event is free and open to the public.

DevOps DayCamp will kick off DevOps BootCamp, allowing students to start their DevOps education early in the school year. In order to accommodate different experience levels, DayCamp is comprised of two tracks: a beginner track and an advanced track. The beginner track will help inexperienced attendees get started with DevOps through introductory sessions and workshops on the basics of DevOps. Additionally, the advanced track will be comprised of a hands-on hackathon with educational sessions throughout the day for the more experienced DevOps crowd. Advanced track sessions will be given by industry professionals and will include Ansible, Travis CI and Docker.

The OSL is hosting DevOps DayCamp instead of the fall Beaver Barcamp. Due to the tight academic calendar, as well as the amount of organizing a successful Barcamp entails, Beaver Barcamp is now an annual event held in the Spring.

Read more

Make Bash, Not War

At the OSL we have shared workstations, most of which are named after colors. In the NOC, I usually work at emerald.workstation.osuosl.bak (Figure 1). I use tmux (Figure *) to multiplex so I can have multiple terminals open in a single ssh connection and connect to my session from anywhere. When splitting the terminal vertically, the prompt can get so long that it's hard to see the command that I'm entering (Figure 2). I'd like my prompt to automatically shorten itself in narrow windows. Fortunately, my terminal already knows how much space it has available: $COLUMNS is an environment variable which stores how wide your current terminal is, and the default unixism is 80. So in order to save space, I'd like to shorten my prompt to only a directory listing and a colored character replacing the normal $ or >.

Behold! (Figure 3, 4)

Read more

Pages