Skip to content

Instantly share code, notes, and snippets.

View cwant's full-sized avatar

Chris Want cwant

View GitHub Profile
@cwant
cwant / tess-dokku.md
Last active March 8, 2024 21:16
TeSS: Dokku-ization and 12-factor-ization

This guide provides some notes on how I used Dokku to deploy TeSS.

Dokku is a platform that allows easy deployment of apps via git (akin to Heroku) for applications that follow 12-factor principles.

My preferred setup:

  • I like to use docker-compose in development. I follow the guide in the TeSS documentation to get this working.
  • I like to use Dokku in production. It makes zero-downtime upgrades a breeze. Steps below are intended to make this work.
  • I prefer to use Rails credentials to minimize the number of secrets I need to communicate to my app through environment variables
@cwant
cwant / README.md
Last active April 19, 2023 19:27
20 hour D3 course -- some notes

Motivation

A few years ago I wrote a (mostly) JS website that aims to show the impact of resource asks on scheduling resources: https://slurm-wizard.uofa.c3.ca/

This was written mostly with Plotly and jQuery, and was not easy to write, in particular it was difficult to get Plotly to do what I wanted it to with it's high-level interface.

Plotly is written with D3, so I thought it might be time to explore this lower-level library.

So I looked into a 20 hour course on YouTube ...

@cwant
cwant / README.md
Last active September 9, 2022 22:41
Tessagon with Simple Inkscape Scripting

Dokku on the Compute Canada cloud

First: lets provision a cloud VM

Lets spin up a cloud VM so we can talk about other stuff while we wait.

  • Deploy an Ubuntu 20.04 instance.
  • p4-3gb will work fine.
  • Make sure the keypair is injected
  • Make sure to associate the static IP to the one used for DNS (see below)

Dokku on the Compute Canada cloud

First: lets provision a cloud VM

Lets spin up a cloud VM so we can talk about other stuff while we wait.

  • Deploy an Ubuntu 18.04 instance.
  • Make sure the keypair is injected
  • Make sure to associate the static IP to the one used for DNS (see below)
  • Don't forget to set a disk size!!!! (20GB will do)
@cwant
cwant / dokku-presentation-script.md
Last active June 10, 2023 16:54
Dokku on Compute Canada cloud demo

Dokku on the Compute Canada cloud

First: lets provision a cloud VM

Lets spin up a cloud VM so we can talk about other stuff while we wait.

  • Deploy an Ubuntu 18.04 instance.
  • Make sure the keypair is injected
  • Make sure to associate the static IP to the one used for DNS (see below)
  • Don't forget to set a disk size!!!! (20GB will do)
@cwant
cwant / install.sh
Created April 9, 2018 20:08
This is a script that takes a fresh Compute Canada Ubuntu 16.04 cloud instance, installs docker, docker-compose, ruby, grabs avalon source, and starts services
#!/bin/bash
BIND_NETWORK='192.168'
RUBY_VERSION='2.4'
BUNDLER_VERSION='1.14'
AVALON_REPO='https://github.com/cwant/avalon'
AVALON_BRANCH='cwant/docker-refactor'
SRC_DIR=$HOME/gitwork
AVALON_DIR=$SRC_DIR/avalon
@cwant
cwant / Here are two tests that pass:
Created February 1, 2017 18:54
Avalon test suite ordering dependency (?)
$ bundle exec rspec ./spec/integration/omniauth_callbacks_controller_spec.rb[1:1:2] ./spec/features/capybara_playlist_spec.rb[1:10]
[Coveralls] Set up the SimpleCov formatter.
[Coveralls] Using SimpleCov's 'rails' settings.
Run options: include {:ids=>{"./spec/integration/omniauth_callbacks_controller_spec.rb"=>["1:1:2"], "./spec/features/capybara_playlist_spec.rb"=>["1:10"]}}
Users::OmniauthCallbacksController
lti
should create the course if necessary