Page MenuHomePhabricator

Get Hello, World app running on Wikimedia Labs
Closed, ResolvedPublic

Event Timeline

ThatAndromeda claimed this task.
ThatAndromeda raised the priority of this task from to Medium.
ThatAndromeda updated the task description. (Show Details)

Current status: I have a Labs instance that I can log into and install things on. I think I have Postgres functioning properly. However, I need to set some persistent environment variables to finish Django config, and /etc/profile.d says it's managed by Puppet, so I'm hesitant to change that for fear it will be blown away. I've also not verified that my nginx config works.

Ideally, someone else would Just Make Nginx Work (or Apache; I'm not picky), or hand me a recipe for doing so easily. And I need guidance on setting persistent environment variables. Then I should be able to drop the Django app on top of everything and have it work.

@yuvipanda, @coren, and @Andrew: Could one of you help with the configuration on this? We would like to make sure that @ThatAndromeda who is a contractor for TWL, can work on our project in a timely manner.

Right, I've clarified with @Ocaasi that I am to be writing code, not setting up servers. So here's what I need:

  • My labs instance should be ready to run a Django 1.8/Python 3 app
  • This means it needs to have nginx/apache/whatever just working
  • And also postgres (I'll need to know the credentials for authenticating to the database)
  • It also will need to have some dependencies installed (I can provide a versioned requirements.txt file) - ideally I will have a dead simple way to update them myself (along the lines of "pip install requirements.txt")
  • It will need to have some environment variables set - I can provide those, or you can tell me the incantation to use that will survive your Puppet config

My ideal world is that, if I put the Django app in your preferred directory, and then point a browser at my labs instance, I will see my app. Think "git push heroku master".

I've done some yakshaving on my labs instance trying to get to that point, but feel free to blow it away.

@Ocaasi, reassigning this to you.

Ocaasi raised the priority of this task from Medium to High.EditedJan 22 2016, 6:27 PM

We really need this done. If Marc, Yuvi, or Andrew can help us with this, it would enable Community Engagement to go forward on a project that scales one of our most successful programs. We also have potential funds for this to be done, if a contractor (community member/volunteer) wants to do it. We need your help with this to move forward with the rest of the build.

can help us with this

What are the specific questions / help needed?
Has this also been brought up already on the Labs mailing list or on the Cloud-Services IRC channel?

Andre, all the details I have so far are here:

I will post to Labs, wikitech, and IRC. Thanks for the tips!

Also, if you know what other info I need to spec out the task, please help inform me so I can include it.


Setting up instances for projects is certainly not the responsibility of the Labs TechOps team. I'm going to remove them from the subscribe list for this issue so that they don't get more email/web pings on the topic.

I'm not familiar with how puppet is configured in this environment, but I'd do something like this for the environment variables (again, unsure where the puppet classes live):

file { "/etc/profile.d/":
  content => 'export FOO="bar"'

For nginx I'd install the jfryman-nginx module; this basic config would get it started:

class { 'nginx':

nginx::resource::vhost { 'http://your.domain':
  www_root => '/path/to/files',

Hope that's helpful.

WMF has several django apps already configured in puppet. (apparently graphite, sentry, and servermon. based on a simple grep. )

I suggest you use one of those apps' manifests as a guide. (possibly see who authored those manifests and ask for help too)

@Sadads, btw, puppet is many things (a language, an agent, a server, etc.) but in most contexts it should just be "puppet", not "the puppet".

I can help on Saturday night, would that help ? can @ThatAndromeda be around at that time? around 18:00 UTC and onward.

18:00 UTC on Saturday works for me. @Ocaasi will get you my contact info, and vice versa. Thanks!