Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Ansible scripts #3286

Merged
merged 1 commit into from
Jan 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 1 addition & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,26 +77,6 @@ jobs:
status: "FAILURE (functional test $BROWSER)"
color: danger

ansible_buildout_test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Ansible buildout test
run: docker run -v ${GITHUB_WORKSPACE}:/openprescribing/ dockette/debian:buster /bin/bash -c "cd /openprescribing/ansible && bash test_playbook.sh"
env:
LANG: en_US.UTF-8
- name: Notify slack failure
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: technoise
status: "FAILURE (ansible)"
color: danger

linting:
runs-on: ubuntu-latest

Expand Down Expand Up @@ -124,7 +104,7 @@ jobs:

notify_slack:
runs-on: ubuntu-latest
needs: [ unit_test , functional_tests , ansible_buildout_test, linting ]
needs: [ unit_test , functional_tests , linting ]

steps:
- name: Notify slack success
Expand Down
31 changes: 8 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@ Information about data sources used on OpenPrescribing can be found [here](https

# Set up the application

You can install the application dependencies either on bare metal, or
virtualised inside docker, or virtualbox (via vagrant).
You can install the application dependencies either on bare metal or
virtualised inside docker.

Which to use?

* The vagrant route is probably the easiest. It creates a virtual
Debian server and then uses `ansible` to install all the dependencies
for you.
* We currently deploy the site to production on bare metal, though we
may well switch to using ansible in the medium term. Use this route
if you don't want to mess around with virtualisation for some
Expand All @@ -26,24 +23,12 @@ Which to use?
environment. Use this route to reproduce the Github Actions test
environment exactly (i.e. you probably don't want to use this route!)

## Using vagrant

Requires [Vagrant](https://www.vagrantup.com/downloads.html) and [VirtualBox](https://www.virtualbox.org/wiki/Downloads)

### Provision the vagrant box


cd openprescribing/ansible
vagrant up # invokes `vagrant provision` the first time it's run

### Start the server

vagrant ssh # also activates the virtualenv for you
python manage.py runserver_plus 0.0.0.0:8000

The application should then be accessible at
``http://127.0.0.1:3333/`` (using the vagrant-forwarded port) from a
web browser on the host computer.
Note: we used to have a set of Ansible scripts for configuring a Vagrant
box ready for local development but, while these were tested in CI, they
weren't being actively used and it turned out to be non-trivial to
get them to install Python 3.8; so we've removed them for now. See the
below PR if you want to investigate restoring them:
https://github.com/ebmdatalab/openprescribing/pull/3286

## Using bare metal

Expand Down
12 changes: 0 additions & 12 deletions ansible/README.md

This file was deleted.

69 changes: 0 additions & 69 deletions ansible/Vagrantfile

This file was deleted.

3 changes: 0 additions & 3 deletions ansible/ansible.cfg

This file was deleted.

106 changes: 0 additions & 106 deletions ansible/roles/app/tasks/main.yml

This file was deleted.

105 changes: 0 additions & 105 deletions ansible/roles/setup/files/pg_hba.conf

This file was deleted.

Loading