Giter Club home page Giter Club logo

nau_playbooks's Introduction

Nau playbooks

This repository holds the specific playbooks required to manage the Open edX installation at NAU.

Clone the required repositories

This repository uses 2 different other repositories.

The configuration is the Open edX upstream that install the Open edX old way of deployment using Ansible.

The secure-nau-data repository is the private NAU repository where the keys and passwords are stored, on per environment.

Commands to clone the dependencies:

git clone -b nau/nutmeg.master https://github.com/fccn/configuration.git configuration
git clone -b master [email protected]:fccn/secure-nau-data.git nau-data
git clone -b master [email protected]:fccn/nau_playbooks.git nau_playbooks

Installing Old Python3.8

Because of the old version of Open edX that we use on NAU, we need to use the older Python 3.8 version. So to execute the deployment process on newer Debian based Operating System like Ubuntu, we need to add the additional deadsnakes Personal Package Archives (PPA) and install the older Python 3.8 version.

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.8 python3.8-dev python3.8-venv python3.8-distutils

Installing Pip on Python3.8

To install the pip on the older Python version 3.8, run:

wget https://bootstrap.pypa.io/get-pip.py
python3.8 get-pip.py

Installing OS packages

Some python pip dependencies or some ansible modules also require some operating system packages.

sudo apt install -y build-essential software-properties-common python3-software-properties curl git libxml2-dev libxslt1-dev libfreetype6-dev python3-pip python3-apt python3-dev tree libmysqlclient-dev libssl-dev libffi-dev python3-minimal

Initializing Python Virtual Environment and Install dependencies

python3.8 -m venv venv
source venv/bin/activate

pip install -r requirements.txt
ansible-galaxy install -p vendor/roles -r requirements.yml

Run an ansible playbook

To run an ansible playbook, like for example the deploy.yml playbook, use a similar command:

ansible-playbook -i nau-data/envs/development/hosts.ini deploy.yml --limit XPTO

nau_playbooks's People

Contributors

diegomillan avatar felipemontoya avatar igobranco avatar moisesgsalas avatar morenol avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

caikec

nau_playbooks's Issues

Automate ssl certificate generation using certbot

Previous work:
We already have a PROC for SSL certificate generation using Let's Encrypt.

Motivation:
Currently we are using on nau.edu.pt certificates issued by Sectigo, from the RCTSaai community.
But it was decided from the major players, like Google that manages Chrome and the major Certificate entities, to reduce the max time of certificates ssl validation to 90 days.

We need to automate the SSl certificate generation using CertBot, because the Sectigo Certificate authority supports ACME protocol.

Backup and restore Redis

Currently we aren't backing up the Redis database, because this is primary used for caching related.
Nevertheless, when we change the VIP of Redis databases, the Open edX LMS has a performance penalty, because all course structure isn't saved in the Redis cache. Also the logged in users are all logged out.

We could create a new ansible playbook that backups Redis, save the backup on Ceph S3, and then restore it on the secondary server. This could be run on the middle of the night to not impact our users. If some outrage occurs during the day this won't impact our users.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.