<commit_before>.. _google-page:

************
Google Cloud
************

Nextflow provides out of the box support for the `Google Cloud Platform <https://cloud.google.com/>`_
enabling the seamless deployment and execution of Nextflow pipelines over Google cloud services.

The execution can be done either deploying a Nextflow managed cluster using `Google Compute Engine <https://cloud.google.com/compute/>`_
instances or via the `Genomics Pipelines <https://cloud.google.com/genomics/>`_ managed service.

.. warning:: This is an experimental feature and it may change in a future release. It requires Nextflow
  version `18.12.0-edge` or later.


Requirements
============

Nextflow
--------
Install Nextflow version `18.12.0-edge` download it from the GitHub release page [link], then
give execute permission to the downloaded file and move it in a directory in your ``PATH`` (optional).


Credentials
-----------

To allow the deployment in the Google Cloud you need to configure the security credentials using
a *Security account key* JSON file.

Nextflow looks for this file using the ``GOOGLE_APPLICATION_CREDENTIALS`` variable that
has to be defined in the launching environment.

If you don't have it, download the credentials file from the Google Cloud Console following this steps:

* Open the `Google Cloud Console <https://console.cloud.google.com>`_
* Go to APIs & Services → Credentials
* Click on the *Create credentials* (blue) drop-down and choose *Service account key*, in the following page
* Select an existing *Service account* or create a new one if needed
* Select JSON as *Key type*
* Click the *Create* button and download the JSON file giving a name of your choice e.g. ``creds.json``.
<commit_msg>Update NF installation for GCP [ci skip]<commit_after>.. _google-page:

************
Google Cloud
************

Nextflow provides out of the box support for the `Google Cloud Platform <https://cloud.google.com/>`_
enabling the seamless deployment and execution of Nextflow pipelines over Google cloud services.

The execution can be done either deploying a Nextflow managed cluster using `Google Compute Engine <https://cloud.google.com/compute/>`_
instances or via the `Genomics Pipelines <https://cloud.google.com/genomics/>`_ managed service.

.. warning:: This is an experimental feature and it may change in a future release. It requires Nextflow
  version ``18.12.0-edge`` or later.


Requirements
============

Nextflow
--------
The support for Google Cloud requires Nextflow version ``18.12.0-edge``. To install it define the following variables
in your system environment::

    export NXF_VER=18.12.0-edge
    export NXF_MODE=google

Then run the following command:

    curl https://get.nextflow.io | bash

Complete the installation copying the ``nextflow`` launcher script in a directory in your system ``PATH`` (optional).


Credentials
-----------

To allow the deployment in the Google Cloud you need to configure the security credentials using
a *Security account key* JSON file.

Nextflow looks for this file using the ``GOOGLE_APPLICATION_CREDENTIALS`` variable that
has to be defined in the launching environment.

If you don't have it, download the credentials file from the Google Cloud Console following this steps:

* Open the `Google Cloud Console <https://console.cloud.google.com>`_
* Go to APIs & Services → Credentials
* Click on the *Create credentials* (blue) drop-down and choose *Service account key*, in the following page
* Select an existing *Service account* or create a new one if needed
* Select JSON as *Key type*
* Click the *Create* button and download the JSON file giving a name of your choice e.g. ``creds.json``.

{'fraction_non_alphanumeric': 0.0998914223669924, 'fraction_numerical': 0.0067861020629750276, 'mean_word_length': 4.340579710144928, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 9, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5954980', 'n_tokens_mistral': 968, 'n_tokens_neox': 925, 'n_words': 480}