* Kompilieren der i18n-Dateien (für die Damen und Herren, die des Englischen nicht ganz so mächtig sind).
Das sieht beim ersten Mal so aus:
-```
-frank.brehm@terraform ~/Work/terraform (test) > ./update-env.sh
- * Searching for valid Python …
-
- * Found 'python3.6'.
- * Searching for valid virtualenv …
- * Found 'virtualenv'.
-
----------------------------------------------------
- * Preparing virtual environment …
-
-
-Running virtualenv with interpreter /usr/bin/python3.6
-Using base prefix '/usr'
-New python executable in /home/fbrehm/Work/terraform/venv/bin/python3.6
-Also creating executable in /home/fbrehm/Work/terraform/venv/bin/python
-Installing setuptools, pkg_resources, pip, wheel...done.
----------------------------------------------------
- * Upgrading PIP …
-
-Requirement already up-to-date: pip in ./venv/lib/python3.6/site-packages (19.3.1)
-
----------------------------------------------------
- * Upgrading setuptools + wheel + six …
-
-Requirement already up-to-date: setuptools in ./venv/lib/python3.6/site-packages (44.0.0)
-Requirement already up-to-date: wheel in ./venv/lib/python3.6/site-packages (0.33.6)
-Collecting six
- Using cached https://files.pythonhosted.org/packages/65/26/32b8464df2a97e6dd1b656ed26b2c194606c16fe163c695a992b36c11cdf/six-1.13.0-py2.py3-none-any.whl
-Installing collected packages: six
-Successfully installed six-1.13.0
-
----------------------------------------------------
- * Installing and/or upgrading necessary modules …
-
-Collecting git+https://git.pixelpark.com/python/python_fb_tools.git@master (from -r requirements.txt (line 1))
- Cloning https://git.pixelpark.com/python/python_fb_tools.git (to revision master) to /tmp/pip-req-build-e3j7xdeq
- Running command git clone -q https://git.pixelpark.com/python/python_fb_tools.git /tmp/pip-req-build-e3j7xdeq
-Collecting git+ssh://****@git.pixelpark.com/ppadmin/create-terraform.git@master (from -r requirements.txt (line 2))
- Cloning ssh://****@git.pixelpark.com/ppadmin/create-terraform.git (to revision master) to /tmp/pip-req-build-ae6iyodq
- Running command git clone -q 'ssh://****@git.pixelpark.com/ppadmin/create-terraform.git' /tmp/pip-req-build-ae6iyodq
-Collecting requests
- Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl
-Collecting Babel
- Using cached https://files.pythonhosted.org/packages/15/a1/522dccd23e5d2e47aed4b6a16795b8213e3272c7506e625f2425ad025a19/Babel-2.8.0-py2.py3-none-any.whl
-Processing /home/fbrehm/.cache/pip/wheels/54/b7/c7/2ada654ee54483c9329871665aaf4a6056c3ce36f29cf66e67/PyYAML-5.2-cp36-cp36m-linux_x86_64.whl
-Processing /home/fbrehm/.cache/pip/wheels/79/04/32/49efab8d7c4728408253a358c51b7eeaed8778b9c529422715/pyvmomi-6.7.3-py2.py3-none-any.whl
-Requirement already up-to-date: six in ./venv/lib/python3.6/site-packages (from create-terraform==1.4.5->-r requirements.txt (line 2)) (1.13.0)
-Collecting pytz
- Using cached https://files.pythonhosted.org/packages/e7/f9/f0b53f88060247251bf481fa6ea62cd0d25bf1b11a87888e53ce5b7c8ad2/pytz-2019.3-py2.py3-none-any.whl
-Collecting dnspython
- Using cached https://files.pythonhosted.org/packages/ec/d3/3aa0e7213ef72b8585747aa0e271a9523e713813b9a20177ebe1e939deb0/dnspython-1.16.0-py2.py3-none-any.whl
-Collecting certifi>=2017.4.17
- Using cached https://files.pythonhosted.org/packages/b9/63/df50cac98ea0d5b006c55a399c3bf1db9da7b5a24de7890bc9cfd5dd9e99/certifi-2019.11.28-py2.py3-none-any.whl
-Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
- Using cached https://files.pythonhosted.org/packages/b4/40/a9837291310ee1ccc242ceb6ebfd9eb21539649f193a7c8c86ba15b98539/urllib3-1.25.7-py2.py3-none-any.whl
-Collecting idna<2.9,>=2.5
- Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
-Collecting chardet<3.1.0,>=3.0.2
- Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
-Building wheels for collected packages: fb-tools, create-terraform
- Building wheel for fb-tools (setup.py) ... done
- Created wheel for fb-tools: filename=fb_tools-1.6.3-cp36-none-any.whl size=176047 sha256=f4ed06120c58121e97adce0a9965d2cb1cc8680a817577040397517c6c72673c
- Stored in directory: /tmp/pip-ephem-wheel-cache-okkvs3lr/wheels/f8/76/fc/061af9e9c357147e9edcac185c3edb280f5366ddba4ce6ed5a
- Building wheel for create-terraform (setup.py) ... done
- Created wheel for create-terraform: filename=create_terraform-1.4.5-cp36-none-any.whl size=91977 sha256=1115a8cc682af20ce272191375b966fb88fd0a21bbe87551996393d4e7df17a0
- Stored in directory: /tmp/pip-ephem-wheel-cache-okkvs3lr/wheels/d2/18/30/66c65b0882f4db9e8f159f049e7086a17e7a56bd3ea0c32cbb
-Successfully built fb-tools create-terraform
-Installing collected packages: certifi, urllib3, idna, chardet, requests, pytz, Babel, fb-tools, PyYAML, pyvmomi, dnspython, create-terraform
-Successfully installed Babel-2.8.0 PyYAML-5.2 certifi-2019.11.28 chardet-3.0.4 create-terraform-1.4.5 dnspython-1.16.0 fb-tools-1.6.3 idna-2.8 pytz-2019.3 pyvmomi-6.7.3 requests-2.22.0 urllib3-1.25.7
-
----------------------------------------------------
- * Installed modules:
-
-Package Version
----------------- ----------
-Babel 2.8.0
-certifi 2019.11.28
-chardet 3.0.4
-create-terraform 1.4.5
-dnspython 1.16.0
-fb-tools 1.6.3
-idna 2.8
-pip 19.3.1
-pkg-resources 0.0.0
-pytz 2019.3
-pyvmomi 6.7.3
-PyYAML 5.2
-requests 2.22.0
-setuptools 44.0.0
-six 1.13.0
-urllib3 1.25.7
-wheel 0.33.6
-
----------------------------------------------------
- * Fertig.
-
-frank.brehm@ns1-local ~/Work/terraform (test) >
-
-```
+
+ frank.brehm@terraform ~/Work/terraform (master) > ./update-env.sh
+ * Searching for valid Python …
+
+ * Found 'python3.6'.
+ * Searching for valid virtualenv …
+ * Found 'virtualenv'.
+
+ ---------------------------------------------------
+ * Preparing virtual environment …
+
+
+ Running virtualenv with interpreter /usr/bin/python3.6
+ Using base prefix '/usr'
+ New python executable in /home/frank.brehm/Work/terraform/venv/bin/python3.6
+ Also creating executable in /home/frank.brehm/Work/terraform/venv/bin/python
+ Installing setuptools, pip, wheel...done.
+ ---------------------------------------------------
+ * Upgrading PIP …
+
+ Cache entry deserialization failed, entry ignored
+ Collecting pip
+ Cache entry deserialization failed, entry ignored
+ Downloading https://files.pythonhosted.org/packages/ca/31/b88ef447d595963c01060998cb329251648acf4a067721b0452c45527eb8/pip-21.2.4-py3-none-any.whl (1.6MB)
+ 100% |████████████████████████████████| 1.6MB 639kB/s
+ Installing collected packages: pip
+ Found existing installation: pip 9.0.1
+ Uninstalling pip-9.0.1:
+ Successfully uninstalled pip-9.0.1
+ Successfully installed pip-21.2.4
+
+ ---------------------------------------------------
+ * Upgrading setuptools + wheel + six …
+
+ Requirement already satisfied: setuptools in ./venv/lib/python3.6/site-packages (28.8.0)
+ Collecting setuptools
+ Downloading setuptools-58.0.4-py3-none-any.whl (816 kB)
+ |████████████████████████████████| 816 kB 5.0 MB/s
+ Requirement already satisfied: wheel in ./venv/lib/python3.6/site-packages (0.29.0)
+ Collecting wheel
+ Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
+ Collecting six
+ Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
+ Installing collected packages: wheel, six, setuptools
+ Attempting uninstall: wheel
+ Found existing installation: wheel 0.29.0
+ Uninstalling wheel-0.29.0:
+ Successfully uninstalled wheel-0.29.0
+ Attempting uninstall: setuptools
+ Found existing installation: setuptools 28.8.0
+ Uninstalling setuptools-28.8.0:
+ Successfully uninstalled setuptools-28.8.0
+ Successfully installed setuptools-58.0.4 six-1.16.0 wheel-0.37.0
+
+ ---------------------------------------------------
+ * Installing and/or upgrading necessary modules …
+
+ Collecting git+https://git.pixelpark.com/python/python_fb_tools.git@master (from -r requirements.txt (line 1))
+ Cloning https://git.pixelpark.com/python/python_fb_tools.git (to revision master) to /tmp/pip-req-build-jopdm6u1
+ Running command git clone -q https://git.pixelpark.com/python/python_fb_tools.git /tmp/pip-req-build-jopdm6u1
+ Resolved https://git.pixelpark.com/python/python_fb_tools.git to commit fd56197a044933bf51a620d43473bdd78edff9c1
+ Collecting git+ssh://****@git.pixelpark.com/ppadmin/create-terraform.git@master (from -r requirements.txt (line 2))
+ Cloning ssh://****@git.pixelpark.com/ppadmin/create-terraform.git (to revision master) to /tmp/pip-req-build-vnxkh8vm
+ Running command git clone -q 'ssh://****@git.pixelpark.com/ppadmin/create-terraform.git' /tmp/pip-req-build-vnxkh8vm
+ Resolved ssh://****@git.pixelpark.com/ppadmin/create-terraform.git to commit 76bfe7f15340ea1cabf02dc18498c1e5579e93e9
+ Collecting requests
+ Using cached requests-2.26.0-py2.py3-none-any.whl (62 kB)
+ Collecting Babel
+ Using cached Babel-2.9.1-py2.py3-none-any.whl (8.8 MB)
+ Collecting PyYAML
+ Using cached PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl (640 kB)
+ Collecting pyvmomi
+ Using cached pyvmomi-7.0.2-py2.py3-none-any.whl
+ Requirement already satisfied: six in ./venv/lib/python3.6/site-packages (from create-terraform==1.5.5->-r requirements.txt (line 2)) (1.16.0)
+ Collecting pytz
+ Using cached pytz-2021.1-py2.py3-none-any.whl (510 kB)
+ Collecting dnspython
+ Using cached dnspython-2.1.0-py3-none-any.whl (241 kB)
+ Collecting idna<4,>=2.5
+ Using cached idna-3.2-py3-none-any.whl (59 kB)
+ Collecting urllib3<1.27,>=1.21.1
+ Using cached urllib3-1.26.6-py2.py3-none-any.whl (138 kB)
+ Collecting charset-normalizer~=2.0.0
+ Downloading charset_normalizer-2.0.5-py3-none-any.whl (37 kB)
+ Collecting certifi>=2017.4.17
+ Using cached certifi-2021.5.30-py2.py3-none-any.whl (145 kB)
+ Building wheels for collected packages: fb-tools, create-terraform
+ Building wheel for fb-tools (setup.py) ... done
+ Created wheel for fb-tools: filename=fb_tools-1.8.0-py3-none-any.whl size=198475 sha256=840c5b0f83499e95c148cf9969cf7a9671155b0762088c6e0ebda313ed44188f
+ Stored in directory: /tmp/pip-ephem-wheel-cache-b8xeugli/wheels/e3/f5/9c/1176a214055be5872842c208e1605f39344a9de85767fdd00d
+ Building wheel for create-terraform (setup.py) ... done
+ Created wheel for create-terraform: filename=create_terraform-1.5.5-py3-none-any.whl size=112260 sha256=2316632c830586578ca7b6fbac41906af1c56a6ab9be5825d97e318af10f23d8
+ Stored in directory: /tmp/pip-ephem-wheel-cache-b8xeugli/wheels/a5/8d/cd/00f20a106e8ded9f66dd7399a62644a3213100c3df1e0066e0
+ Successfully built fb-tools create-terraform
+ Installing collected packages: urllib3, pytz, idna, charset-normalizer, certifi, requests, Babel, PyYAML, pyvmomi, fb-tools, dnspython, create-terraform
+ Successfully installed Babel-2.9.1 PyYAML-5.4.1 certifi-2021.5.30 charset-normalizer-2.0.5 create-terraform-1.5.5 dnspython-2.1.0 fb-tools-1.8.0 idna-3.2 pytz-2021.1 pyvmomi-7.0.2 requests-2.26.0 urllib3-1.26.6
+
+ ---------------------------------------------------
+ * Installed modules:
+
+ Package Version
+ ------------------ ---------
+ Babel 2.9.1
+ certifi 2021.5.30
+ charset-normalizer 2.0.5
+ create-terraform 1.5.5
+ dnspython 2.1.0
+ fb-tools 1.8.0
+ idna 3.2
+ pip 21.2.4
+ pytz 2021.1
+ pyvmomi 7.0.2
+ PyYAML 5.4.1
+ requests 2.26.0
+ setuptools 58.0.4
+ six 1.16.0
+ urllib3 1.26.6
+ wheel 0.37.0
+
+ ---------------------------------------------------
+ * Fertig.
+
+ frank.brehm@terraform ~/Work/terraform (master) >
#### Update der virtuellen Umgebung
Der nächste Schritt ist grundsätzlich vor jeder Arbeitssitzung zu machen, um die virtuelle
Umgebung zu aktivieren:
-```
-frank.brehm@terraform ~/Work/terraform (test) > . venv/bin/activate
-frank.brehm@ns1-local ~/Work/terraform (test) >
-```
+ frank.brehm@terraform ~/Work/terraform (test) > . venv/bin/activate
+ frank.brehm@ns1-local ~/Work/terraform (test) >
Mindestens einmal nach der Einrichtung der virtuellen Umgebung, aber auch später regelmäßig sollte
danach die Umgebung mittels **update-env.sh** aktualisiert werden:
-```
-frank.brehm@ns1-local ~/Work/terraform (test) > ./update-env.sh
-Preparing virtual environment ...
+ frank.brehm@ns1-local ~/Work/terraform (test) > ./update-env.sh
+ Preparing virtual environment ...
----------------------------------------------------
-Installing and/or upgrading necessary modules ...
+ ---------------------------------------------------
+ Installing and/or upgrading necessary modules ...
-Requirement already up-to-date: pip in ./venv/lib/python3.6/site-packages (from -r requirements.txt (line 1)) (19.0.1)
-.
-.
-.
-frank.brehm@ns1-local ~/Work/terraform (test) >
-```
+ Requirement already up-to-date: pip in ./venv/lib/python3.6/site-packages (from -r requirements.txt (line 1)) (19.0.1)
+ .
+ .
+ .
+ frank.brehm@ns1-local ~/Work/terraform (test) >
Wenn es Probleme beim Update gibt, die aus einem zu alten Virtual Environment stammen,
einfach das Verzeichnis `venv` komplett löschen und das Update-Script neu ausführen.
Vor jeder Arbeit ist die virtualle Umgebung zu aktivieren:
-```
-frank@bruni ~/Develop/PP/terraform (master) > . venv/bin/activate
-(venv) frank@bruni ~/Develop/PP/terraform (master) >
-(venv) frank@bruni ~/Develop/PP/terraform (master) > which create-terraform
-/home/frank/Develop/PP/terraform/venv/bin/create-terraform
-(venv) frank@bruni ~/Develop/PP/terraform (master) >
-```
+ frank@bruni ~/Develop/PP/terraform (master) > . venv/bin/activate
+ (venv) frank@bruni ~/Develop/PP/terraform (master) >
+ (venv) frank@bruni ~/Develop/PP/terraform (master) > which create-terraform
+ /home/frank/Develop/PP/terraform/venv/bin/create-terraform
+ (venv) frank@bruni ~/Develop/PP/terraform (master) >
Wie oben ersichtlich, befindet sich der Befehl **create-terraform** nach der Aktivierung im
Pfad für ausführbare Dateien.
Um diese Konfigurationsdatei initial zu erstellen, ist es am einfachsten, die Datei _'venv/etc/create-terraform.ini.default'_
nach _'create-terraform.ini'_ zu kopieren und dort alle fehlenden Werte manuell nachzutragen.
-```
-(venv) frana.brehmk@terraform ~/Develop/PP/terraform (master) > ll venv/etc/
-insgesamt 4
--rw-r--r-- 1 frank users 3291 Jan 3 15:13 create-terraform.ini.default
-(venv) frank.brehm@terraform ~/Develop/PP/terraform (master) >
-(venv) frank.brehm@terraform ~/Develop/PP/terraform (master) >
-(venv) frank.brehm@terraform ~/Develop/PP/terraform (master) > cp -vi venv/etc/create-terraform.ini.default create-terraform.ini
-'venv/etc/create-terraform.ini.default' -> 'venv/etc/create-terraform.ini'
-(venv) frank.brehm@terraform ~/Develop/PP/terraform (master) >
-(venv) frank.brehm@terraform ~/Develop/PP/terraform (master) > chmod 0600 create-terraform.ini
-(venv) frank.brehm@terraform ~/Develop/PP/terraform (master) >
-(venv) frank.brehm@terraform ~/Develop/PP/terraform (master) > vi create-terraform.ini
-(venv) frank.brehm@terraform ~/Develop/PP/terraform (master) >
-```
+ (venv) frana.brehmk@terraform ~/Develop/PP/terraform (master) > ll venv/etc/
+ insgesamt 4
+ -rw-r--r-- 1 frank users 3291 Jan 3 15:13 create-terraform.ini.default
+ (venv) frank.brehm@terraform ~/Develop/PP/terraform (master) >
+ (venv) frank.brehm@terraform ~/Develop/PP/terraform (master) >
+ (venv) frank.brehm@terraform ~/Develop/PP/terraform (master) > cp -vi venv/etc/create-terraform.ini.default create-terraform.ini
+ 'venv/etc/create-terraform.ini.default' -> 'venv/etc/create-terraform.ini'
+ (venv) frank.brehm@terraform ~/Develop/PP/terraform (master) >
+ (venv) frank.brehm@terraform ~/Develop/PP/terraform (master) > chmod 0600 create-terraform.ini
+ (venv) frank.brehm@terraform ~/Develop/PP/terraform (master) >
+ (venv) frank.brehm@terraform ~/Develop/PP/terraform (master) > vi create-terraform.ini
+ (venv) frank.brehm@terraform ~/Develop/PP/terraform (master) >
Für fast alle Konfigurations-Parameter sind bereits sinnvolle Vorgabewerte definiert worden (welches auch die
auskommentierten Einträge in der _create-terraform.ini.default_ sind). Aber es gibt Ausnahmen: