手元のディレクトリが次のような構成で
./app
├── index.html
├── bar
│ └── hoge
└── foo
この記事はGoogle Cloud Platform(1) Advent Calendar 2016の3日目となります!
Google Cloud Platform(以下、GCP)のサービスも一部はTokyoにようやくRegionが来たことだし、そろそろ利用してみたいと思った人も多いのではないでしょうか。 今回は、Google Compute Engine(以下、GCE)をTerraformを利用して構成管理をしてみます。
特に意味はないですが、気づいたら文字ばかりだったので、下記に今回利用するサービスのロゴを載せます。
GCP | Terraform |
---|---|
/* | |
* Copyright (C) 2016 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |
* use this file except in compliance with the License. You may obtain a copy of | |
* the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
# The following won't work as-is, I use '<>' to denote variables you need to replace, including a name so you can keep them straight! | |
# A list of all of them, for searching follows. | |
# app_directory | |
# app_name | |
# ssl_password | |
# ssl_name | |
#base machine is meant to contain IIS as well as asp/.net requirements | |
FROM microsoft/aspnet | |
#Expose port 443 to allow incoming traffic over the default HTTPS port |
This concept is very much like .jar
or .war
archives in Java.
NOTE: The built
.pyz
zipapp can run on both Python 2 & 3 but you can only build.pyz
zipapps with Python 3.5 or later.
#!/usr/bin/env python | |
# vim: set fileencoding=utf-8 | |
# | |
# USAGE: | |
# Back up your tmux old config, run the script and redirect stdout to your conf | |
# file. Example: | |
# | |
# $ cp ~/.tmux.conf ~/.tmux.conf.orig | |
# $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf | |
# |