diff --git a/ec3 b/ec3 index dbf9be8..cf7820e 100755 --- a/ec3 +++ b/ec3 @@ -380,7 +380,7 @@ class Display: @staticmethod def display(msg): Display.clean() - sys.stdout.write(str(msg) + "\n") + sys.stdout.write("%s\n" % msg) sys.stdout.flush() class ClusterStore: @@ -719,7 +719,7 @@ class CmdLaunch: for elem in resp.json()["uri-list"]: vm_ids.append(os.path.basename(list(elem.values())[0])) except Exception as e: - CLI.display("Error launching front-end: %s" % str(e), level=logging.ERROR) + CLI.display("Error launching front-end: %s" % e.message, level=logging.ERROR) sys.exit(1) CLI.display("Infrastructure successfully created with ID: %s" % infrId, alt=infrId) diff --git a/templates/pypka.radl b/templates/pypka.radl new file mode 100644 index 0000000..8b8eeef --- /dev/null +++ b/templates/pypka.radl @@ -0,0 +1,79 @@ +description pypka ( + kind = 'component' and + short = 'PypKa Server.' and + content = 'Flexible Poisson-Boltzmann based pKa calculations with proton tautomerism. + +Webpage: https://pypka.org/' +) + +configure front ( +@begin +--- + - ec3_prio: -10 + tasks: + + - name: Add psql repo key + apt_key: + url: "https://www.postgresql.org/media/keys/ACCC4CF8.asc" + state: present + + - name: Add psql repo + apt_repository: + repo: 'deb http://apt.postgresql.org/pub/repos/apt/ {{ansible_distribution_release}}-pgdg main' + state: present + update_cache: yes + + - name: install apt requisites + apt: + pkg: + - libgfortran4 + - gawk + - python3-pip + - autossh + - postgresql + - python2 + + - name: Install pypka + pip: + name: + - sqlalchemy + - psycopg2-binary + - pypka +@end +) + +configure wn ( +@begin +--- + - ec3_prio: -10 + tasks: + + - name: Add psql repo key + apt_key: + url: "https://www.postgresql.org/media/keys/ACCC4CF8.asc" + state: present + + - name: Add psql repo + apt_repository: + repo: 'deb http://apt.postgresql.org/pub/repos/apt/ {{ansible_distribution_release}}-pgdg main' + state: present + update_cache: yes + + - name: install apt requisites + apt: + pkg: + - libgfortran4 + - gawk + - python3-pip + - autossh + - postgresql-client + - python2 + + - name: Install pypka + pip: + name: + - sqlalchemy + - psycopg2-binary + - pypka +@end +)