From 1a6d3cda451b97acf59f79de6b11fbdd22b6ef1f Mon Sep 17 00:00:00 2001 From: Nick White Date: Tue, 22 Oct 2019 11:43:09 +0100 Subject: Remove unused roles, reorganise to better reflect the current state of affairs --- README | 7 ++++++ host_vars/devami | 6 ----- host_vars/pipelineami | 2 -- host_vars/trainerami | 4 ++++ hosts | 17 +------------- roles/ocropuser/tasks/main.yml | 2 -- roles/ocropuser/tasks/ocropus.yml | 41 --------------------------------- roles/preprocessor/tasks/main.yml | 3 --- roles/preprocessor/tasks/pdfimages.yml | 5 ---- roles/preprocessor/tasks/scantailor.yml | 41 --------------------------------- site.yml | 36 ----------------------------- trainer.yml | 9 ++++++++ 12 files changed, 21 insertions(+), 152 deletions(-) delete mode 100644 host_vars/devami create mode 100644 host_vars/trainerami delete mode 100644 roles/ocropuser/tasks/main.yml delete mode 100644 roles/ocropuser/tasks/ocropus.yml delete mode 100644 roles/preprocessor/tasks/main.yml delete mode 100644 roles/preprocessor/tasks/pdfimages.yml delete mode 100644 roles/preprocessor/tasks/scantailor.yml delete mode 100644 site.yml create mode 100644 trainer.yml diff --git a/README b/README index 4657153..cc9c8ec 100644 --- a/README +++ b/README @@ -1,3 +1,10 @@ +# Ansible configuration for AMIs + +These are ansible sets to configure new server images, to save as +preconfigured images (AMIs). + +--- + To create a fresh pipeliner image: - Find the latest Debian AMI ID by finding the latest one from here: https://wiki.debian.org/Cloud/AmazonEC2Image/Stretch in the output from: diff --git a/host_vars/devami b/host_vars/devami deleted file mode 100644 index 4c51f68..0000000 --- a/host_vars/devami +++ /dev/null @@ -1,6 +0,0 @@ ---- -ansible_host: ec2-3-8-40-197.eu-west-2.compute.amazonaws.com -ansible_user: ec2-user -ansible_ssh_private_key_file: ~/rescribe/2018-natphil/aws/awsdev2.pem -# note: may need to set control_path in ~/.ansible.cfg as described at -# https://stackoverflow.com/questions/35970686/ansible-ssh-error-unix-listener-too-long-for-unix-domain-socket diff --git a/host_vars/pipelineami b/host_vars/pipelineami index f6d4f47..cccc2aa 100644 --- a/host_vars/pipelineami +++ b/host_vars/pipelineami @@ -2,5 +2,3 @@ ansible_host: 35.177.176.126 ansible_user: admin ansible_ssh_private_key_file: ~/rescribe/2018-natphil/aws/awsdev2.pem -# note: may need to set control_path in ~/.ansible.cfg as described at -# https://stackoverflow.com/questions/35970686/ansible-ssh-error-unix-listener-too-long-for-unix-domain-socket diff --git a/host_vars/trainerami b/host_vars/trainerami new file mode 100644 index 0000000..ac67032 --- /dev/null +++ b/host_vars/trainerami @@ -0,0 +1,4 @@ +--- +ansible_host: ec2-3-8-40-197.eu-west-2.compute.amazonaws.com +ansible_user: ec2-user +ansible_ssh_private_key_file: ~/rescribe/2018-natphil/aws/awsdev2.pem diff --git a/hosts b/hosts index 0b141c2..7d87a82 100644 --- a/hosts +++ b/hosts @@ -1,18 +1,3 @@ [servers] -devami -pipelineami - -[tesseractors] -pipelineami - -[tesstrainers] -devami - -[ocropussies] -devami - -[preprocessors] -devami - -[pipeliners] pipelineami +trainerami diff --git a/roles/ocropuser/tasks/main.yml b/roles/ocropuser/tasks/main.yml deleted file mode 100644 index 79ae937..0000000 --- a/roles/ocropuser/tasks/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -- include: ocropus.yml diff --git a/roles/ocropuser/tasks/ocropus.yml b/roles/ocropuser/tasks/ocropus.yml deleted file mode 100644 index de626e5..0000000 --- a/roles/ocropuser/tasks/ocropus.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -# Installs ocropus - -- name: Install ocropus dependencies - package: name={{ item }} state=present - with_items: - - git - - python-lxml - - python-pillow - - python2-pip - - scipy - - tkinter - -- name: Install extra dependencies with pip (as user) - pip: name={{ item }} extra_args="--user -U" - become: no - with_items: - - matplotlib - - numpy - -- name: Clone ocropus repository - git: - repo: https://github.com/nickjwhite/ocropy - dest: /home/ec2-user/src/ocropy - depth: 1 - version: currentworking - become: no - register: ocroclone - -- name: Build ocropus - command: python setup.py build - args: - chdir: /home/ec2-user/src/ocropy - become: no - when: ocroclone.changed - -- name: Install ocropus - command: python setup.py install - args: - chdir: /home/ec2-user/src/ocropy - when: ocroclone.changed diff --git a/roles/preprocessor/tasks/main.yml b/roles/preprocessor/tasks/main.yml deleted file mode 100644 index e5823e4..0000000 --- a/roles/preprocessor/tasks/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -- include: pdfimages.yml -- include: scantailor.yml diff --git a/roles/preprocessor/tasks/pdfimages.yml b/roles/preprocessor/tasks/pdfimages.yml deleted file mode 100644 index 81bd1eb..0000000 --- a/roles/preprocessor/tasks/pdfimages.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -# Installs pdfimages - -- name: Install poppler-utils for pdfimages - package: name=poppler-utils state=present diff --git a/roles/preprocessor/tasks/scantailor.yml b/roles/preprocessor/tasks/scantailor.yml deleted file mode 100644 index 8a8820e..0000000 --- a/roles/preprocessor/tasks/scantailor.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -# Installs scantailor - -- name: Install scantailor dependencies - package: name={{ item }} state=present - with_items: - - boost-devel - - cmake - - gcc-c++ - - git - - libjpeg-turbo-devel - - libpng-devel - - libtiff-devel - - libXrender-devel - - make - - qt-devel - - zlib-devel - -- name: Clone scantailor repository - git: - repo: https://github.com/scantailor/scantailor - dest: /home/ec2-user/src/scantailor - depth: 1 - become: no - register: scanclone - -- name: Configure and build scantailor - command: "{{ item }}" - args: - chdir: /home/ec2-user/src/scantailor - with_items: - - cmake . - - make - become: no - when: scanclone.changed - -- name: Install scantailor - command: make install - args: - chdir: /home/ec2-user/src/scantailor - when: scanclone.changed diff --git a/site.yml b/site.yml deleted file mode 100644 index 85a6cd2..0000000 --- a/site.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- - -- name: Configure servers - hosts: servers - become: yes - - roles: - - server - -- name: Configure servers for Tesseract - hosts: tesseractors - become: yes - - roles: - - tesseractor - -- name: Configure servers for Tesseract with training tools - hosts: tesstrainers - become: yes - - roles: - - tesstrainer - -- name: Configure servers for Ocropus - hosts: ocropussies - become: yes - - roles: - - ocropuser - -- name: Configure servers for preprocessing - hosts: preprocessors - become: yes - - roles: - - preprocessor diff --git a/trainer.yml b/trainer.yml new file mode 100644 index 0000000..fb392b3 --- /dev/null +++ b/trainer.yml @@ -0,0 +1,9 @@ +--- + +- name: Configure trainer servers + hosts: trainerami + become: yes + + roles: + - server + - tesstrainer -- cgit v1.2.1-24-ge1ad