<commit_before>Google Compute Engine
=====================

.. versionadded:: 0.3

As of microservices-infrastructure 0.3 you can bring up Google Compute Engine
environments using Terraform. microservices-infrastructure uses Terraform to
provision hosts in OpenStack. You can `download Terraform from terraform.io
<http://www.terraform.io/downloads.html>`_.

Configuring Google Compute Engine for Terraform
-----------------------------------------------

Before we can build any servers using Terraform and Ansible, we need to
configure authentication. We'll be filling in the authentication variables for
the template located at ``terraform/gce.sample.tf``. It looks like this:

.. this is highlighted as javascript for convenience, but obviously that's not
   the *real* language.
.. literalinclude:: ../../terraform/gce.sample.tf
   :language: javascript

Copy that file in it's entirety to the root of the project to start
customization. In the next sections, we'll explain how to obtain these settings.

Basic Settings
^^^^^^^^^^^^^^

``project`` and ``region`` are unique values for each project in Google Compute
Engine. ``project`` is available from the project overview page (use the short
ID.) You can select which region you want to use from any of the GCE zones (see<commit_msg>Update gce.rst<commit_after>Google Compute Engine
=====================

.. versionadded:: 0.3

As of Mantl 0.3 you can bring up Google Compute Engine
environments using Terraform. microservices-infrastructure uses Terraform to
provision hosts in OpenStack. You can `download Terraform from terraform.io
<http://www.terraform.io/downloads.html>`_.

Configuring Google Compute Engine for Terraform
-----------------------------------------------

Before we can build any servers using Terraform and Ansible, we need to
configure authentication. We'll be filling in the authentication variables for
the template located at ``terraform/gce.sample.tf``. It looks like this:

.. this is highlighted as javascript for convenience, but obviously that's not
   the *real* language.
.. literalinclude:: ../../terraform/gce.sample.tf
   :language: javascript

Copy that file in it's entirety to the root of the project to start
customization. In the next sections, we'll explain how to obtain these settings.

Basic Settings
^^^^^^^^^^^^^^

``project`` and ``region`` are unique values for each project in Google Compute
Engine. ``project`` is available from the project overview page (use the short
ID.) You can select which region you want to use from any of the GCE zones (see
{'fraction_non_alphanumeric': 0.128125, 'fraction_numerical': 0.003125, 'mean_word_length': 3.832075471698113, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7432958', 'n_tokens_mistral': 660, 'n_tokens_neox': 625, 'n_words': 318}