Skip to content

Commit

Permalink
Merge branch 'master' into ansible
Browse files Browse the repository at this point in the history
  • Loading branch information
ttimbers committed Aug 27, 2020
2 parents 93e1468 + c22d688 commit 7007d4f
Show file tree
Hide file tree
Showing 150 changed files with 4,006 additions and 209 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/publish_docker_images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Publish JupyterHub Docker images on DockerHub
on:
push:
paths:
- 'dockerfiles/dsci-student/Dockerfile'
- 'dockerfiles/dsci-grading/Dockerfile'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@master
with:
fetch-depth: '0'
- name: Bump version and push tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
id: bump
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ steps.bump.outputs.new_tag }}
release_name: ${{ steps.bump.outputs.new_tag }}
body: |
Changes in this Release
- Rebuilt r-dsci-100 Docker image and published to DockerHub with new tag
- Rebuilt r-dsci-grading Docker image and published to DockerHub with new tag
draft: false
prerelease: false
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: ubcstat/dsci-student
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
workdir: dockerfiles/dsci-student
tags: "${{ steps.bump.outputs.new_tag }}"
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: ubcdsci/dsci-grading
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
workdir: dockerfiles/dsci-grading
tags: "${{ steps.bump.outputs.new_tag }}"
5 changes: 1 addition & 4 deletions ansible/group_vars/all/ssh-public-keys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@
ssh_public_keys:
- user: 'centos'
state: 'present'
public_key: '<SSH KEY 1>'
- user: 'centos'
state: 'present'
public_key: '<SSH KEY 2>'
public_key: 'ssh-rsa FAKEKEYAAAAB3NzaC1yc2EAAAADAQABAAACAQDsqCs8irideWHhAXD7UdjLyrNzSldJcz2d2IChszaB+Z1xThYAPITguMTe4w2kA9c4n9OcoKgn49D8JnNoXjM7Pc3Iy9qJOEe0Qyf+rnPuONAK5ar+BIcp/5JWW4y1aEpE4+MBQvdUd/6hJ86dOEFi9ngvhsMqR8usT2h5KRWHRgnlL0hL/TF/O4Ekm6eHgAsQbYiu0OMPYHmf8li8tpyXl4dMYTOJeLMQC5ZGh882oYarxmP5N0WdTKGQ5pNZ2RUYDws0IipBdpmDanfaXu8asaURTRzQwIM0OOIoEfQzgC/nZVJzvzWu/aY3PN95B0AFmgFKtcA8jKzPyXyNSHNs3IreFJ1pBLmjyXr+kQx/NOZTfGletUqU9+50UciVaEnkeGwT5UjDrP4dvLi66TjY2rrVJ2IE1UQPRFWurOjMkgQaSzPoiR0ocnDCFVIqHFIRnZYOKpHVqXqxfQg8e57NQsl2eaJ1FohcMgr5hfvU+NfIsBu1cbakmazqK6iy3Os5/Y2NxJI10Qgl9xVifSI3aS5ntqtS7dHEmvTWPR1cUHgTVNeylDcR+ULy2bM9Y8w== [email protected]'
6 changes: 3 additions & 3 deletions ansible/group_vars/hubs/jupyterhub.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
jupyterhub_authenticator: 'ltiauthenticator'
jupyterhub_course_name: 'dsci'
jupyterhub_docker_image: 'ubcdsci/dsci-student'
jupyterhub_docker_container: 'ubcdsci/dsci-student:latest'
jupyterhub_course_name: 'dsci100'
jupyterhub_docker_image: 'ubcdsci/r-dsci-100'
jupyterhub_docker_container: 'ubcdsci/r-dsci-100:latest'

jupyterhub_spawners:
dockerspawner:
Expand Down
4 changes: 2 additions & 2 deletions ansible/inventory
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<STUDENT_HUB_DOMAIN> ansible_host=<STUDENT_HUB_IP_ADDRESS>
course101.rudaux.com ansible_host=3.96.232.57

[hubs]
<STUDENT_HUB_DOMAIN>
course101.rudaux.com

[production:children]
hubs
2 changes: 2 additions & 0 deletions ansible/roles/external/ansible/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.retry
tests/test.sh
29 changes: 29 additions & 0 deletions ansible/roles/external/ansible/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
services: docker

env:
- distro: centos7
- distro: centos6
- distro: fedora27
- distro: ubuntu1604
- distro: ubuntu1404
- distro: ubuntu1204
- distro: debian8

script:
# Configure test script so we can run extra tests after playbook is run.
- export container_id=$(date +%s)
- export cleanup=false

# Download test shim.
- wget -O ${PWD}/tests/test.sh https://gist.githubusercontent.com/geerlingguy/73ef1e5ee45d8694570f334be385e181/raw/
- chmod +x ${PWD}/tests/test.sh

# Run tests.
- ${PWD}/tests/test.sh

# Ensure Ansible is installed (contrived... since it's already installed).
- 'docker exec --tty ${container_id} env TERM=xterm ansible --version'

notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
20 changes: 20 additions & 0 deletions ansible/roles/external/ansible/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2017 Jeff Geerling

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 changes: 31 additions & 0 deletions ansible/roles/external/ansible/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Ansible Role: Ansible

[![Build Status](https://travis-ci.org/geerlingguy/ansible-role-ansible.svg?branch=master)](https://travis-ci.org/geerlingguy/ansible-role-ansible)

An Ansible Role that installs Ansible on Linux servers.

## Requirements

If using on a RedHat/CentOS-based host, make sure you've added the EPEL repository (it can easily be installed by including the `geerlingguy.repo-epel` role on Ansible Galaxy).

## Role Variables

None.

## Dependencies

None.

## Example Playbook

- hosts: servers
roles:
- role: geerlingguy.ansible

## License

MIT / BSD

## Author Information

This role was created in 2014 by [Jeff Geerling](https://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/).
2 changes: 2 additions & 0 deletions ansible/roles/external/ansible/meta/.galaxy_install_info
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
install_date: Tue Aug 18 16:40:51 2020
version: 1.3.0
30 changes: 30 additions & 0 deletions ansible/roles/external/ansible/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
dependencies: []

galaxy_info:
author: geerlingguy
description: Ansible for RedHat/CentOS/Debian/Ubuntu.
company: "Midwestern Mac, LLC"
license: "license (BSD, MIT)"
min_ansible_version: 2.4
platforms:
- name: EL
versions:
- 6
- 7
- name: Fedora
versions:
- all
- name: Debian
versions:
- all
- name: Ubuntu
versions:
- all
galaxy_tags:
- system
- packaging
- development
- cloud
- ansible
- automation
13 changes: 13 additions & 0 deletions ansible/roles/external/ansible/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
# Setup/install tasks.
- include_tasks: setup-RedHat.yml
when: ansible_os_family == 'RedHat' and ansible_distribution != 'Fedora'

- include_tasks: setup-Fedora.yml
when: ansible_distribution == 'Fedora'

- include_tasks: setup-Ubuntu.yml
when: ansible_distribution == 'Ubuntu'

- include_tasks: setup-Debian.yml
when: ansible_distribution == 'Debian'
15 changes: 15 additions & 0 deletions ansible/roles/external/ansible/tasks/setup-Debian.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
- name: Enable Backports repository.
apt_repository:
repo: 'deb http://ftp.debian.org/debian {{ ansible_distribution_release }}-backports main'
state: present
filename: "{{ ansible_distribution_release }}_backports"

- name: Update apt cache.
apt: update_cache=yes cache_valid_time=86400

- name: Install Ansible.
apt:
name: ansible
state: present
default_release: "{{ ansible_distribution_release }}-backports"
3 changes: 3 additions & 0 deletions ansible/roles/external/ansible/tasks/setup-Fedora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
- name: Install Ansible.
package: name=ansible state=present
3 changes: 3 additions & 0 deletions ansible/roles/external/ansible/tasks/setup-RedHat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
- name: Install Ansible.
yum: name=ansible state=present enablerepo=epel
9 changes: 9 additions & 0 deletions ansible/roles/external/ansible/tasks/setup-Ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
- name: Add ansible repository.
apt_repository: repo='ppa:ansible/ansible'

- name: Update apt cache.
apt: update_cache=yes cache_valid_time=86400

- name: Install Ansible.
apt: name=ansible state=present
11 changes: 11 additions & 0 deletions ansible/roles/external/ansible/tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ansible Role tests

To run the test playbook(s) in this directory:

1. Install and start Docker.
1. Download the test shim (see .travis.yml file for the URL) into `tests/test.sh`:
- `wget -O tests/test.sh https://gist.githubusercontent.com/geerlingguy/73ef1e5ee45d8694570f334be385e181/raw/`
1. Make the test shim executable: `chmod +x tests/test.sh`.
1. Run (from the role root directory) `distro=[distro] playbook=[playbook] ./tests/test.sh`

If you don't want the container to be automatically deleted after the test playbook is run, add the following environment variables: `cleanup=false container_id=$(date +%s)`
5 changes: 5 additions & 0 deletions ansible/roles/external/ansible/tests/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- hosts: all

roles:
- role_under_test
2 changes: 2 additions & 0 deletions ansible/roles/external/apache/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.retry
tests/test.sh
21 changes: 21 additions & 0 deletions ansible/roles/external/apache/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
services: docker

env:
- distro: centos7
- distro: centos6
- distro: ubuntu1604
- distro: ubuntu1404
- distro: ubuntu1204
- distro: debian8

script:
# Download test shim.
- wget -O ${PWD}/tests/test.sh https://gist.githubusercontent.com/geerlingguy/73ef1e5ee45d8694570f334be385e181/raw/
- chmod +x ${PWD}/tests/test.sh

# Run tests.
- ${PWD}/tests/test.sh

notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
20 changes: 20 additions & 0 deletions ansible/roles/external/apache/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2017 Jeff Geerling

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading

0 comments on commit 7007d4f

Please sign in to comment.