Skip to content

Commit

Permalink
Merge pull request #82 from ARTbio/AG2023-01
Browse files Browse the repository at this point in the history
Update of Analyse des génomes - édition 2023
  • Loading branch information
drosofff authored Nov 13, 2023
2 parents d3df56e + 4d405b5 commit 96a7f3c
Show file tree
Hide file tree
Showing 100 changed files with 118 additions and 198 deletions.
62 changes: 0 additions & 62 deletions docs/AnalyseGenomes_2022/Install_tools.md

This file was deleted.

Binary file not shown.
86 changes: 0 additions & 86 deletions docs/AnalyseGenomes_2022/manage_galaxy.md

This file was deleted.

30 changes: 30 additions & 0 deletions docs/AnalyseGenomes_2023/Install_tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Go back to your Google ssh terminal

- Run the following script using the bash interpreter:
```
source /root/.bashrc && \
bash /root/AnalyseGenome/GalaxyServer/install_galaxy_tools.sh
```
You should now be asked for an API key:
```
please enter your admin API key:
```
The next section explains how to generate and copy this API key to interact programmatically
with the Galaxy server and be able to install tools

## Go back to your Galaxy web window

In the main menu `User` --> `Preferences`

![user preferences](images/user_preferences.png){width="200"}

Select `Manage API Key`, click `Create a new Key`, and copy the current API key

## Paste the copied API key in the Google ssh terminal

and press the ++return++ key

The tool installation should start immediately and last for about 15 minutes (you should
see tools installing one at a time)

---
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,40 +28,51 @@ sh deploy_galaxy.sh
This command runs the sh script
[deploy_galaxy.sh](https://raw.githubusercontent.com/ARTbio/AnalyseGenome/main/GalaxyServer/deploy_galaxy.sh)
You should see an abundant log scrolling down. Don't worry !
Running `deploy_galaxy.sh` shows abundant log scrolling down. The task being executed are:
- All Galaxy dependencies required for the Galaxy server instance are being downloaded and installed
- The Galaxy computing environment is automatically set up
- the Galaxy web server is installed and static pages are built
- The Galaxy database (sqlight) is automatically upgraded to its latest structure/model
- All python dependencies required for the Galaxy server instance are downloaded and installed
- The Galaxy computing environment (virtualenv) is automatically set up
- the Galaxy web server is installed (gunicorn) and static pages are built
- The Galaxy database (SQLite) is automatically upgraded to its latest structure/model
- The package manager Conda, which is heavily used by Galaxy to install its tools is installed.
After ~10 minutes, you should see the following log in the ssh console:
This deployment process takes a while (~20 minutes with the release 23.1 of Galaxy), but
this will happen only once.
Naturally, the nextime you start Galaxy, the process will be quickly skipped.
<center>
![](images/coffee_time.png){width="200"}
</center>
When deployment is finished, you will see the following log in the console:
```{.bash title="Terminal"}
Executing: galaxyctl start
Registered galaxy config: /root/galaxy/config/galaxy.yml
Creating or updating service gunicorn
Creating or updating service celery
Creating or updating service celery-beat
celery: added process group
celery-beat: added process group
gunicorn: added process group
celery STARTING
celery-beat STARTING
gunicorn STARTING
Log files are in /root/galaxy/database/gravity/log
Adding systemd unit galaxy-gunicorn.service
Adding systemd unit galaxy-celery.service
Adding systemd unit galaxy-celery-beat.service
Adding systemd unit galaxy.target
Created symlink /etc/systemd/system/multi-user.target.wants/galaxy.target → /etc/systemd/system/galaxy.target.
UNIT LOAD ACTIVE SUB DESCRIPTION
galaxy-celery-beat.service loaded active running Galaxy celery-beat
galaxy-celery.service loaded active running Galaxy celery
galaxy-gunicorn.service loaded active running Galaxy gunicorn
galaxy.target loaded active active Galaxy
LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
4 loaded units listed.
To show all installed unit files use 'systemctl list-unit-files'.
Galaxy is now running as a daemon in the background
and is controlled by systemctl
```
We will review in a section apart how to display the server activity, stop, start or restart
it.

??? bug "In case of band width issue only"
```
wget https://raw.githubusercontent.com/ARTbio/AnalyseGenome/main/GalaxyServer/deploy_galaxy_B.sh && \
sh deploy_galaxy_B.sh
```

### 2. Connect to your living Galaxy instance

You should now be able to access to you Galaxy instance in a your web browser window.
Expand All @@ -79,7 +90,10 @@ You should now be able to access to you Galaxy instance in a your web browser wi
![register](images/register.png){ width="300" }

and **register** to your instance using the email address
`[email protected]` and the password of your choice (:warning: don't forget it)
```
[email protected]
```
and the password of your choice (:warning: don't forget it)

- After login, you should see the admin tab in the top menu of the Galaxy interface.

Expand Down
File renamed without changes.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added docs/AnalyseGenomes_2023/images/coffee_time.png
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@ If you read this, you have probably launched at least one time a Google Virtual

A few rules to get your life easier during the rest of this training:

- ==**Never** stop your VM, instead **suspend** it==
- ==**Avoid** stopping your VM, instead **suspend** it==

Stopping your VM is like stopping your PC or you laptop.

You will stop everything and will have to literally reboot everything, including
the Galaxy server. It is not that difficult actually (see below). However, you have
many things to learn these days and it better not use your time and memory just to do
that.
the Galaxy server. It is not that difficult actually, but it takes a bit more time.

Instead, **Suspending** your VM is like putting your PC in sleeping mode, or closing
the lid of your laptop.

Thus, remember, at the end of the day or whenever you will not use your VM for a long
Thus, remember, at the end of the day or whenever you are not going to use your VM for a long
time, use:

![suspend](images/suspend.png)
Expand Down
26 changes: 26 additions & 0 deletions docs/AnalyseGenomes_2023/manage_galaxy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
!!! info "Galaxy server commands, quick reminder"
Check that the server is running and see last logs
```
systemctl status galaxy*.service

# the three services Galaxy celery-beat, celery and gunicorn must be
# active and running (green)
```
Restart the server
```
systemctl restart galaxy.target
```
Start the Galaxy server, if for any reason it is down
```
systemctl start galaxy.target
```
Follow the activity of the web part only (gunicorn) of the Galaxy server:
```
systemctl status galaxy-gunicorn.service
```

## A graphical view of the Galaxy server states and the commands to control them

![Galaxy server states](images/GalaxyStates-AG2022.png){width="1200"}

---
File renamed without changes.
File renamed without changes.
File renamed without changes.
38 changes: 19 additions & 19 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,25 +115,25 @@ nav:

- Galaxy Trainings:

- Analyse des Génomes (2022):
- PLAN: AnalyseGenomes_2022/outline.md
- START A VIRTUAL MACHINE IN GOOGLE CLOUD ENGINE : AnalyseGenomes_2022/bare-galaxy-google.md
- DEPLOY A GALAXY SERVER IN THE VM: AnalyseGenomes_2022/deploy-galaxy-server.md
- INSTALL GALAXY TOOLS: AnalyseGenomes_2022/Install_tools.md
- MANAGE YOUR GOOGLE VM: AnalyseGenomes_2022/manage_VM.md
- MANAGE YOUR GALAXY SERVER: AnalyseGenomes_2022/manage_galaxy.md
- BOWTIE ALIGNMENT USING COMMAND LINES: AnalyseGenomes_2022/bowtie_cli.md
- BOWTIE ALIGNMENT USING GALAXY: AnalyseGenomes_2022/bowtie_galaxy.md
- LOAD TRAINING DATA: AnalyseGenomes_2022/Loading_data_in_galaxy.md
- PREPARE A REFERENCE GENOME: AnalyseGenomes_2022/Preparing_reference.md
- Format conversion using command lines: AnalyseGenomes_2022/file_parsing_cli.md
- Format conversion using a galaxy tool: AnalyseGenomes_2022/file_parsing_galaxy.md
- Running a galaxy workflow: AnalyseGenomes_2022/Run_workflow.md
- Why administering galaxy ?: AnalyseGenomes_2022/whyadmin.md
- "Appendix 1: Getting a Google Cloud Engine Account": AnalyseGenomes_2022/Google_cloud_Account.md
- "Appendix 2: Start and stop a Google virtual machine": AnalyseGenomes_2022/spin_off_VM.md
- "Appendix 3: The ADMIN tool kit": AnalyseGenomes_2022/admin_kit.md
- "Appendix 4: EMERGENCY image!": AnalyseGenomes_2022/emergency_image.md
- Analyse des Génomes (2023):
- PLAN: AnalyseGenomes_2023/outline.md
- START A VIRTUAL MACHINE IN GOOGLE CLOUD ENGINE : AnalyseGenomes_2023/bare-galaxy-google.md
- DEPLOY A GALAXY SERVER IN THE VM: AnalyseGenomes_2023/deploy-galaxy-server.md
- INSTALL GALAXY TOOLS: AnalyseGenomes_2023/Install_tools.md
- MANAGE YOUR GOOGLE VM: AnalyseGenomes_2023/manage_VM.md
- MANAGE YOUR GALAXY SERVER: AnalyseGenomes_2023/manage_galaxy.md
- BOWTIE ALIGNMENT USING COMMAND LINES: AnalyseGenomes_2023/bowtie_cli.md
- BOWTIE ALIGNMENT USING GALAXY: AnalyseGenomes_2023/bowtie_galaxy.md
- LOAD TRAINING DATA: AnalyseGenomes_2023/Loading_data_in_galaxy.md
- PREPARE A REFERENCE GENOME: AnalyseGenomes_2023/Preparing_reference.md
- Format conversion using command lines: AnalyseGenomes_2023/file_parsing_cli.md
- Format conversion using a galaxy tool: AnalyseGenomes_2023/file_parsing_galaxy.md
- Running a galaxy workflow: AnalyseGenomes_2023/Run_workflow.md
- Why administering galaxy ?: AnalyseGenomes_2023/whyadmin.md
- "Appendix 1: Getting a Google Cloud Engine Account": AnalyseGenomes_2023/Google_cloud_Account.md
- "Appendix 2: Start and stop a Google virtual machine": AnalyseGenomes_2023/spin_off_VM.md
- "Appendix 3: The ADMIN tool kit": AnalyseGenomes_2023/admin_kit.md
- "Appendix 4: EMERGENCY image!": AnalyseGenomes_2023/emergency_image.md

- Run your Galaxy server:
- INTRODUCTION: Run-Galaxy/index.md
Expand Down

0 comments on commit 96a7f3c

Please sign in to comment.