Create a subdomain for your community on UseGalaxy.eu

Author(s) Marie Josse avatar Marie Josse
Reviewers Helena Rasche avatarMira Kuntz avatarMarie Josse avatarBjörn Grüning avatarSaskia Hiltemann avatar
Overview
Creative Commons License: CC-BY Questions:
  • What are the Galaxy communities ?

  • What’s a subdomain ?

  • How do I create one ?

  • How can I customize a subdomain ?

Objectives:
  • Discover Galaxy’s communities

  • Learn how to set up a subdomain for you community

  • Learn how to customize you tool panel

  • Improve the looks and feel of your subdomain main page

Time estimation: 1 hour
Supporting Materials:
Published: Nov 27, 2024
Last modification: Dec 13, 2024
License: Tutorial Content is licensed under Creative Commons Attribution 4.0 International License. The GTN Framework is licensed under MIT
purl PURL: https://gxy.io/GTN:T00473
version Revision: 2

This tutorial covers how to set up a subdomain on usegalaxy.eu. We will take here the example of the earth system subdomain and follow the step one by one.

Agenda

In this tutorial, we will cover:

  1. Add your subdomain on a Galaxy server
  2. Enable the interactive tools
  3. Make a nice tool panel (only for interactive tools)
  4. Customize the front page
  5. Let people know
  6. Conclusion

Add your subdomain on a Galaxy server

Hands-on: Subdomain name
  • Clone the Github repository of the Galaxy server (of where you want your subdomain to be attached)
  • For Galaxy europe clone the Infrastructure repo
  • Create a branch on your fork
  • Open the file dns.tf and edit it
  • You should add the name of your subdomain to the list my_new_and_shiny_subdomain.usegalaxy.eu or for the example here earth-system.usegalaxy.eu AND update count (number of subdomains) as shown below.

Image of the modification to make in the dns.tf file.

  • Then commit your changes and write a nice message for the admin when you open your Pull Request.

Enable the interactive tools

Hands-on: Galaxy Interactive Tool
  • Clone the Github repository of the Galaxy server (of where you want your subdomain to be attached)
  • For Galaxy europe clone the Infrastructure-playbook repo
  • Create a branch on your fork
  • Open the file sn06.yml and edit it
  • You should add the name of your subdomain to the list “.my_new_and_shiny_subdomain.usegalaxy.eu” or for the example here “.earth-system.usegalaxy.eu”
  • AND add “*.interactivetoolentrypoint.interactivetool.earth-system.usegalaxy.eu” as shown below.

Image of the modification to make in the sn06.yml file.

  • Then commit your changes and write a nice message for the admin when you open your Pull Request.
Hands-on: Add the interactive tool section to the tool panel
  • First, on your Infrastructure-playbook fork, create a new branch
  • Go to templates/galaxy/config/
  • Open the file global_host_filters.py.j2 and edit it
  • In the function per_host_tool_labels add your subdomain as followed
    if "earth-system.usegalaxy.eu" in host:
      return label.id in valid_labels"
    
  • Then in the DOMAIN_SECTIONS add the the interactive tool section (this will allow to see on the subdomain interface the tool section “Interactive tools”) as folowed: 'earth-system': ["interactivetools"],

Image of the modification to make in the global_host_filters.py.j2 file.

  • Second, on the same fork go to files/traefik/rules/
  • Open and edit template-subdomains.yml, there you need to add the folowing line for your subdomain {{template "subdomain" "my_new_and_shiny_subdomain"}}

  • Finally, commit all your changes and write a nice message for the admin when you open your Pull Request.

Make a nice tool panel (only for interactive tools)

Hands-on: Customize the tool panel (only for the interactive tools)
  • On your Infrastructure-playbook fork (don’t forget to synchronize it)
  • First, go to templates/galaxy/config/
  • Open the file tool_conf.xml.j2 and edit it
  • From there you can create your own tool sections where your different interactive tools can be organized. See the example of earth-system below. Image of the modification to make in the tool_conf.xml.j2 file.

  • Then, commit your changes

  • Secondly, still in templates/galaxy/config/
  • Open the file global_host_filters.py.j2 and edit it
  • Add the different new sections of tools created to your subdomain and prevent those new sections to appear in any other subdomain as shown below. Image of the modification to make in the global_host_filters.py.j2 file to add your tool sections.

  • Then commit your changes and write a nice message for the admin when you open your Pull Request.

Customize the front page

Hands-on: Update the homepage
  • For Galaxy europe clone the website repo
  • Create a branch on your fork
  • Create an index file in markdown for instance “index-earth-system.md”
  • Once created let your imagnination flows to make the looks and feel of your homepage (if needed here is a PR example)
  • If you want to add images to your front page add them as folowed assets/media/my_incredidle_image.png

  • Then commit your changes, write a nice message for the admin when you open your Pull Request. If in the future you want to change the front page just update the index file.

There is also the possibility to add a custom welcome.html, as well as other custom static files like the singlecell subdomain did

Hands-on: Add a theme
  • On your Infrastructure-playbook fork (don’t forget to synchronize it)
  • Go to group_vars/sn06/
  • Open the file subdomains.yml and edit it. There you have to add the name of your subdomain.
  • In this same file you can also customize a theme for your subdomain.

Let people know

Hands-on: Make some communication on your new subdomain
  • Clone the galaxy-hub repo
  • Create a branch on your fork
  • In content/news create a folder for your news example “2023-10-17-earth-system” and in it create an index.md file
  • In this index file write your blog post don’t hesitate to add some nice photos

  • Then commit your changes and open your Pull Request.

Conclusion

Your Subdomain is ready to be used !