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

Fix beacon tutorial issues #5623

Merged
merged 3 commits into from
Dec 9, 2024
Merged
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
137 changes: 76 additions & 61 deletions topics/admin/tutorials/beacon/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,19 @@ This tutorial will guide you through setting up a [GA4GH Beacon](https://beacon-
> > {: data-cmd="true"}
> {: .code-in}
>
> 2. Install the docker role as well.
>
> > <code-in-title>Bash</code-in-title>
> > ```bash
> > ansible-galaxy collection install community.docker
> > ```
> > {: data-cmd="true"}
> {: .code-in}
>
> > <tip-title>Why doesn't this use the requirements.yml?</tip-title>
> > Ansible over time added the feature of 'collections' in addition to roles. It's a nice and convenient method for grouping roles together. Unfortunately this means we need to update a significant portion of the GAT learning path to use this, which we have not done yet, as it will take a bit of time to do. Collections come with the unpleasant additional aspect that they will be installed into a different path than roles, so we'll need to add a `collections` folder as well, or maybe `deps/collections` and `deps/roles` folders. When this happens we'll have to additionally modify the ansible.cfg to look for collections in this additional path.
> {: .tip}
>
> 3. Create the vars file
>
> {% raw %}
Expand Down Expand Up @@ -160,69 +173,11 @@ This tutorial will guide you through setting up a [GA4GH Beacon](https://beacon-
> > Here we again use some advanced features of Ansible's inventory system. Ansible knows the name of every hostname in the inventory. Now that we want to point the beacon configuration, either at the database which should be on `beacon_server`, or at Galaxy in `galaxyservers`, we ask the `groups` variable for what the inventory looks like. We use `[0]` to pull out the first hostname we find for both of those groups.
> {: .tip}
>
> 3. Add the beacon-server playbook
>
> {% raw %}
> ```diff
> --- /dev/null
> +++ b/beacon-server.yml
> @@ -0,0 +1,9 @@
> +---
> +- name: Beacon Server
> + hosts: beacon_server
> + become: true
> + become_user: root
> + vars_files:
> + - group_vars/secret.yml
> + roles:
> + - paprikant.beacon
> {% endraw %}
> ```
> {: data-commit="Add beacon server playbook"}
>
> 5. Run the playbook
>
> > <code-in-title>Bash</code-in-title>
> > ```bash
> > ansible-playbook beacon-server.yml
> > ```
> > {: data-cmd="true"}
> {: .code-in }
>
> TODO: Check that it works
>
{: .hands_on}

## Setting up the Importer

Now that our beacon is running, we need to get data from Galaxy to the Beacon

> <hands-on-title>Setting up the Beacon Importer</hands-on-title>
>
> 1. Add the beacon-import playbook
>
> {% raw %}
> ```diff
> --- /dev/null
> +++ b/beacon-import.yml
> @@ -0,0 +1,9 @@
> +---
> +- name: Beacon Importer
> + hosts: beacon_import
> + become: true
> + become_user: root
> + vars_files:
> + - group_vars/secret.yml
> + roles:
> + - paprikant.beacon-importer
> {% endraw %}
> ```
> {: data-commit="Add beacon importer playbook"}
>
> 1. Edit your `group_vars/secret.yml` and define some random passwords:
>
> - The API key for your account, which must be an admin
>
> - A password for the beacon database
>
> {% snippet faqs/galaxy/preferences_admin_api_key.md admin=true %}
>
> > <code-in-title>Bash</code-in-title>
Expand Down Expand Up @@ -300,11 +255,71 @@ Now that our beacon is running, we need to get data from Galaxy to the Beacon
>
> -->
>
>
> 3. Add the beacon-server playbook
>
> {% raw %}
> ```diff
> --- /dev/null
> +++ b/beacon-server.yml
> @@ -0,0 +1,9 @@
> +---
> +- name: Beacon Server
> + hosts: beacon_server
> + become: true
> + become_user: root
> + vars_files:
> + - group_vars/secret.yml
> + roles:
> + - paprikant.beacon
> {% endraw %}
> ```
> {: data-commit="Add beacon server playbook"}
>
> 5. Run the playbook
>
> > <code-in-title>Bash</code-in-title>
> > ```bash
> > ansible-playbook beacon-server.yml
> > ```
> > {: data-cmd="true"}
> {: .code-in }
>
> TODO: Check that it works
>
{: .hands_on}

## Setting up the Importer

Now that our beacon is running, we need to get data from Galaxy to the Beacon

> <hands-on-title>Setting up the Beacon Importer</hands-on-title>
>
> 1. Add the beacon-import playbook
>
> {% raw %}
> ```diff
> --- /dev/null
> +++ b/beacon-import.yml
> @@ -0,0 +1,9 @@
> +---
> +- name: Beacon Importer
> + hosts: beacon_import
> + become: true
> + become_user: root
> + vars_files:
> + - group_vars/secret.yml
> + roles:
> + - paprikant.beacon-importer
> {% endraw %}
> ```
> {: data-commit="Add beacon importer playbook"}
>
> 1. Run the playbook
>
> > <code-in-title>Bash</code-in-title>
> > ```bash
> > ansible-playbook beacon-importer.yml
> > ansible-playbook beacon-import.yml
> > ```
> > {: data-cmd="true"}
> {: .code-in }
Expand Down
Loading