{"payload":{"allShortcutsEnabled":false,"path":"terraform","repo":{"id":162725835,"defaultBranch":"master","name":"cif","ownerLogin":"Martin-Weiss","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2018-12-21T14:52:35.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/13362573?v=4","public":true,"private":false,"isOrgOwned":false},"currentUser":null,"refInfo":{"name":"5ace5047f07f72a59f0df4e3e88d7517835913a4","listCacheKey":"v0:1606232406.0","canEdit":false,"refType":"tree","currentOid":"5ace5047f07f72a59f0df4e3e88d7517835913a4"},"tree":{"items":[{"name":"cloud-init","path":"terraform/cloud-init","contentType":"directory"},{"name":".gitignore","path":"terraform/.gitignore","contentType":"file"},{"name":"README.md","path":"terraform/README.md","contentType":"file"},{"name":"apply.sh","path":"terraform/apply.sh","contentType":"file"},{"name":"destroy.sh","path":"terraform/destroy.sh","contentType":"file"},{"name":"export.sh.example","path":"terraform/export.sh.example","contentType":"file"},{"name":"output.tf","path":"terraform/output.tf","contentType":"file"},{"name":"plan.sh","path":"terraform/plan.sh","contentType":"file"},{"name":"registration.auto.tfvars","path":"terraform/registration.auto.tfvars","contentType":"file"},{"name":"server-instance.tf","path":"terraform/server-instance.tf","contentType":"file"},{"name":"server.txt.caasp","path":"terraform/server.txt.caasp","contentType":"file"},{"name":"server.txt.example","path":"terraform/server.txt.example","contentType":"file"},{"name":"server.txt.rke","path":"terraform/server.txt.rke","contentType":"file"},{"name":"terraform.tfvars","path":"terraform/terraform.tfvars","contentType":"file"},{"name":"terraform.tfvars.json.ci.example","path":"terraform/terraform.tfvars.json.ci.example","contentType":"file"},{"name":"variables.tf","path":"terraform/variables.tf","contentType":"file"},{"name":"versions.tf","path":"terraform/versions.tf","contentType":"file"}],"templateDirectorySuggestionUrl":null,"readme":{"displayName":"README.md","richText":"<article class=\"markdown-body entry-content container-lg\" itemprop=\"text\"><h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-introduction\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#introduction\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Introduction</h2>\n<p dir=\"auto\">These terraform definitions are going to create the CaaSP v4 cluster on top of VMWare vSphere cluster.</p>\n<p dir=\"auto\">This code was developed and tested on VMware vSphere cluster based on VMware ESXi 7</p>\n<h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-deployment\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#deployment\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Deployment</h2>\n<p dir=\"auto\">Prepare a VM template machine in vSphere by following <a href=\"https://susedoc.github.io/doc-caasp/master/caasp-deployment/single-html/#_vm_preparation_for_creating_a_template\" rel=\"nofollow\">vmware-deployment guide</a>.</p>\n<p dir=\"auto\">It doesn't matter if you deploy the VM template for SLES15-SP1 manually by using ISO or you use pregenerated vmdk SLES15-SP1 JeOS image but in both cases you'll need <code>cloud-init-vmware-guestinfo</code> package (from SUSE CaaS Platform module), <code>cloud-init</code> package (from Public Cloud Module) and its dependent packages installed. The respective services must be enabled:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"systemctl enable cloud-init cloud-init-local cloud-config cloud-final\"><pre>systemctl <span class=\"pl-c1\">enable</span> cloud-init cloud-init-local cloud-config cloud-final</pre></div>\n<p dir=\"auto\">Next you need to define following environment variables in your current shell with proper value:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# HINT: Please enter just a hostname without specifing a protocol in VSPHERE_SERVER variable (using https by default).\nexport VSPHERE_SERVER=&quot;vsphere.cluster.endpoint.fqdn&quot;\nexport VSPHERE_USER=&quot;vsphere-admin-username&quot;\nexport VSPHERE_PASSWORD=&quot;password&quot;\nexport VSPHERE_ALLOW_UNVERIFIED_SSL=&quot;true&quot;\"><pre><span class=\"pl-c\"><span class=\"pl-c\">#</span> HINT: Please enter just a hostname without specifing a protocol in VSPHERE_SERVER variable (using https by default).</span>\n<span class=\"pl-k\">export</span> VSPHERE_SERVER=<span class=\"pl-s\"><span class=\"pl-pds\">\"</span>vsphere.cluster.endpoint.fqdn<span class=\"pl-pds\">\"</span></span>\n<span class=\"pl-k\">export</span> VSPHERE_USER=<span class=\"pl-s\"><span class=\"pl-pds\">\"</span>vsphere-admin-username<span class=\"pl-pds\">\"</span></span>\n<span class=\"pl-k\">export</span> VSPHERE_PASSWORD=<span class=\"pl-s\"><span class=\"pl-pds\">\"</span>password<span class=\"pl-pds\">\"</span></span>\n<span class=\"pl-k\">export</span> VSPHERE_ALLOW_UNVERIFIED_SSL=<span class=\"pl-s\"><span class=\"pl-pds\">\"</span>true<span class=\"pl-pds\">\"</span></span></pre></div>\n<p dir=\"auto\">Once you perform a <a href=\"#Customization\">Customization</a> you can use <code>terraform</code> to deploy the cluster:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"terraform init\nterraform validate\nterraform plan\nterraform apply\"><pre>terraform init\nterraform validate\nterraform plan\nterraform apply</pre></div>\n<h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-machine-access\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#machine-access\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Machine access</h2>\n<p dir=\"auto\">It is important to have your public ssh key within the <code>authorized_keys</code>, this is done by <code>cloud-init</code> through a terraform variable called <code>authorized_keys</code>.</p>\n<p dir=\"auto\">All the instances have a <code>caaspadm</code> user, password is not set. User can login as <code>caaspadm</code> user over SSH by using his private ssh key. The <code>caaspadm</code> user can perform <code>sudo</code> without specifying a password.</p>\n<h2 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-variables\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#variables\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Variables</h2>\n<p dir=\"auto\"><code>vsphere_datastore</code> - Provide the datastore to use in vSphere<br>\n<code>vsphere_datacenter</code> - Provide the datacenter to use in vSphere<br>\n<code>vsphere_network</code> - Provide the network to use in vSphere - this network must be able to access the ntp servers and the nodes must be able to reach each other<br>\n<code>vsphere_resource_pool</code> - Provide the resource pool the machines will be running in<br>\n<code>template_name</code> - The template name the machines will be copied from<br>\n<code>firmware</code> - Replace the default \"bios\" value with \"efi\" in case your template was created by using EFI firmware<br>\n<code>authorized_keys</code> - A list of ssh public keys that will be installed on all nodes<br>\n<code>repositories</code> - Additional repositories that will be added on all nodes<br>\n<code>packages</code> - Additional packages that will be installed on all nodes</p>\n<p dir=\"auto\">`adjust server.txt with the list of servers you want to create (see server.txt.example)</p>\n<h3 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-please-use-one-of-the-following-options\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#please-use-one-of-the-following-options\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Please use one of the following options:</h3>\n<p dir=\"auto\"><code>caasp_registry_code</code> - Provide SUSE CaaSP Product Registration Code in <code>registration.auto.tfvars</code> file to register product against official SCC server<br>\n<code>rmt_server_name</code> - Provide SUSE Repository Mirroring Tool Server Name in <code>registration.auto.tfvars</code> file to use repositories stored on RMT server\n<code>suma_server_name</code> - Provide SUSE Manager Server Name in <code>registration.auto.tfvars</code> file to use repositories stored on SUSE Manager server</p>\n<h3 tabindex=\"-1\" dir=\"auto\"><a id=\"user-content-open-todo\" class=\"anchor\" aria-hidden=\"true\" tabindex=\"-1\" href=\"#open-todo\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a>Open ToDo:</h3>\n<p dir=\"auto\">terraform destroy -&gt; need to delete servers from rmt/scc/suse manager\nadd suma registration only in case a suma server is specified (not \"\")\nregister only in case an activation key is specified for a system\nfind out how to re-register a system with the same name but different machine-id to suse manager</p>\n</article>","errorMessage":null,"headerInfo":{"toc":[{"level":2,"text":"Introduction","anchor":"introduction","htmlText":"Introduction"},{"level":2,"text":"Deployment","anchor":"deployment","htmlText":"Deployment"},{"level":2,"text":"Machine access","anchor":"machine-access","htmlText":"Machine access"},{"level":2,"text":"Variables","anchor":"variables","htmlText":"Variables"},{"level":3,"text":"Please use one of the following options:","anchor":"please-use-one-of-the-following-options","htmlText":"Please use one of the following options:"},{"level":3,"text":"Open ToDo:","anchor":"open-todo","htmlText":"Open ToDo:"}],"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2FMartin-Weiss%2Fcif%2Ftree%2F5ace5047f07f72a59f0df4e3e88d7517835913a4%2Fterraform"}},"totalCount":17,"showBranchInfobar":false},"fileTree":{"":{"items":[{"name":"autoyast","path":"autoyast","contentType":"directory"},{"name":"boot_cd_build","path":"boot_cd_build","contentType":"directory"},{"name":"kiwi-image-micro","path":"kiwi-image-micro","contentType":"directory"},{"name":"kiwi-image","path":"kiwi-image","contentType":"directory"},{"name":"packer","path":"packer","contentType":"directory"},{"name":"terraform-micro-vmware","path":"terraform-micro-vmware","contentType":"directory"},{"name":"terraform","path":"terraform","contentType":"directory"},{"name":"README.md","path":"README.md","contentType":"file"}],"totalCount":8}},"fileTreeProcessingTime":2.683846,"foldersToFetch":[],"treeExpanded":true,"symbolsExpanded":false,"csrf_tokens":{"/Martin-Weiss/cif/branches":{"post":"9lSUpfdoU79VQOuCFEldQZHe6PU1Px6jThwHub4GqiWO_0DU20lN9lb6csi6Oa2W7HoPa1cr4CBHmUzIP2AUfQ"}}},"title":"cif/terraform at 5ace5047f07f72a59f0df4e3e88d7517835913a4 · Martin-Weiss/cif"}