This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #cloud-init | |
| mounts: | |
| - ["192.2.0.1:/export", "/mnt/efs", "nfs4", "nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #cloud-init | |
| rancher: | |
| mounts: | |
| - ["${efs_server}:/", "/mnt/efs", "nfs4", "nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kernel: | |
| image: linuxkit/kernel:4.9.59 | |
| cmdline: "console=tty0 console=ttyS0 console=ttyAMA0" | |
| init: | |
| - linuxkit/init:42a92119e1ca10380e0d33e26c0cbcf85b9b3558 | |
| - linuxkit/runc:817fdc592eac6cb7804fa1721a43a7f6e23fb50f | |
| - linuxkit/containerd:82be2bbb7cf83bab161ffe2a64624ba1107725ff | |
| - linuxkit/ca-certificates:af4880e78edc28743f7c5e262678c67c6add4c26 | |
| onboot: | |
| - name: sysctl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # CSV | |
| $ usacloud server ls --out csv --col ID --col Name | |
| ID,Name | |
| 123456789001,GoDev01 | |
| 123456789002,GoDev02 | |
| 123456789003,GoDev03 | |
| # TSV | |
| $ usacloud server ls --out csv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| variable "gcp_region" {} // GCP側リージョン | |
| variable "gcp_project" {} // GCPプロジェクトID | |
| variable "gcp_credential_file" {} // GCP認証情報(JSONファイルパス) | |
| variable "sacloud_zone" {} // さくらのクラウド ゾーン | |
| /********************************************************** | |
| * さくらのクラウド側設定 | |
| *********************************************************/ | |
| provider sakuracloud { | |
| zone = "${var.sacloud_zone}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #パスワード定義 | |
| variable password {} | |
| # パブリックアーカイブ(OS)のID参照用のデータソース定義 | |
| data sakuracloud_archive "centos" { | |
| os_type = "centos" | |
| } | |
| # ディスク定義 | |
| resource "sakuracloud_disk" "disk01" { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _motd() { | |
| LOG=$(ls /root/.sacloud-api/notes/*log) | |
| case $1 in | |
| start) | |
| echo -e "\n#-- Startup-script is \\033[0;32mrunning\\033[0;39m. --#\n\nPlease check the log file: ${LOG}\n" > /etc/motd | |
| ;; | |
| fail) | |
| echo -e "\n#-- Startup-script \\033[0;31mfailed\\033[0;39m. --#\n\nPlease check the log file: ${LOG}\n" > /etc/motd | |
| exit 1 | |
| ;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| variable "password" { | |
| default = "PUT_YOUR_PASSWORD_HERE" | |
| } | |
| variable "hostname" { | |
| default = "agent-from-terraform" | |
| } | |
| #Create a new Rancher registration token | |
| resource "rancher_registration_token" "default" { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /root/.sacloud-api/notes/[12桁の数値].log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <unattend xmlns="urn:schemas-microsoft-com:unattend"> | |
| <settings pass="oobeSystem"> | |
| <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
| <OOBE> | |
| <HideEULAPage>true</HideEULAPage> | |
| </OOBE> | |
| <UserAccounts> | |
| <AdministratorPassword> | |
| <Value>PUT-YOUR-PASSWORD-HERE</Value> |