<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Testing tow on tow</title><link>https://towproj.github.io/tow/docs/testing/</link><description>Recent content in Testing tow on tow</description><generator>Hugo</generator><language>en-US</language><atom:link href="https://towproj.github.io/tow/docs/testing/index.xml" rel="self" type="application/rss+xml"/><item><title>Testing on Proxmox VE</title><link>https://towproj.github.io/tow/docs/testing/proxmox/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://towproj.github.io/tow/docs/testing/proxmox/</guid><description>&lt;p&gt;&lt;code&gt;make test-proxmox&lt;/code&gt; runs &lt;code&gt;TestProxmoxInfra&lt;/code&gt; against a real Proxmox VE server. The test:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Runs &lt;code&gt;tow apply&lt;/code&gt; on a cluster file (by default &lt;a href="https://github.com/towproj/tow/blob/main/examples/dev-test-proxmox.yaml"&gt;&lt;code&gt;examples/dev-test-proxmox.yaml&lt;/code&gt;&lt;/a&gt;, which creates one control plane and one worker) under a throwaway name like &lt;code&gt;test-pve-1762540000&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;Logs in to every VM over SSH and checks:&#10;&lt;ul&gt;&#10;&lt;li&gt;the OS is Ubuntu, cloud-init finished, and sudo works without a password&lt;/li&gt;&#10;&lt;li&gt;the hostname is right&lt;/li&gt;&#10;&lt;li&gt;the VM has at least 2 CPUs and about 1.7 GB of memory, the minimum kubeadm accepts&lt;/li&gt;&#10;&lt;li&gt;DNS, HTTPS and the Ubuntu package mirrors are reachable&lt;/li&gt;&#10;&lt;li&gt;every other node answers ping and TCP on its fixed address&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;Runs &lt;code&gt;tow delete&lt;/code&gt;, which fails if Proxmox still lists any VM tagged for the cluster.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;Delete runs even when a check fails, on Ctrl+C, or when the test hits its 20-minute deadline. A run costs nothing and takes a few minutes.&lt;/p&gt;</description></item><item><title>Testing on GCP</title><link>https://towproj.github.io/tow/docs/testing/gcp/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://towproj.github.io/tow/docs/testing/gcp/</guid><description>&lt;p&gt;The GCP tests create real machines in a project of yours, then delete them and check nothing is left. They cost a few cents a run; a free trial&amp;rsquo;s credits cover them.&lt;/p&gt;&#10;&lt;h2 id="setup-once"&gt;Setup, once&lt;a class="td-heading-self-link" href="#setup-once" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ol&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;A project with billing&lt;/strong&gt; (a free trial works), and the two APIs tow uses:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gcloud services &lt;span class="nb"&gt;enable&lt;/span&gt; compute.googleapis.com iam.googleapis.com --project &amp;lt;your-project-id&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Enabling Compute Engine makes Google create a &lt;code&gt;default&lt;/code&gt; VPC in the project. tow doesn&amp;rsquo;t use it: each cluster gets its own VPC.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;Credentials:&lt;/strong&gt; Application Default Credentials, which tow and OpenTofu both read:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gcloud auth application-default login&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;The project to test in&lt;/strong&gt;, named in the environment (it never goes in the repository):&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;TOW_TEST_GCP_PROJECT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;lt;your-project-id&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;TOW_TEST_GCP_REGION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;europe-west1 &lt;span class="c1"&gt;# the default&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&#10;&lt;/ol&gt;</description></item><item><title>Testing on Azure</title><link>https://towproj.github.io/tow/docs/testing/azure/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://towproj.github.io/tow/docs/testing/azure/</guid><description>&lt;p&gt;The Azure tests create real VMs in a subscription of yours, then delete them and check nothing is left. They cost a few cents a run; a free account&amp;rsquo;s credit covers them.&lt;/p&gt;&#10;&lt;h2 id="setup-once"&gt;Setup, once&lt;a class="td-heading-self-link" href="#setup-once" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ol&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;A subscription&lt;/strong&gt; (a free account works). Azure registers the resource providers tow uses (Microsoft.Compute, Microsoft.Network, Microsoft.ManagedIdentity, Microsoft.Authorization, Microsoft.DevTestLab for the test auto-shutdown) on first use; if one isn&amp;rsquo;t, &lt;code&gt;az provider register --namespace &amp;lt;name&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;Credentials:&lt;/strong&gt; your Azure CLI login, which tow and OpenTofu both read:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;az login&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;az account show --query id --output tsv &lt;span class="c1"&gt;# the subscription&amp;#39;s ID&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For a service principal (CI): &lt;code&gt;ARM_CLIENT_ID&lt;/code&gt;, &lt;code&gt;ARM_TENANT_ID&lt;/code&gt; and &lt;code&gt;ARM_CLIENT_SECRET&lt;/code&gt;, which tow reads as OpenTofu&amp;rsquo;s azurerm provider does.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;The subscription to test in&lt;/strong&gt;, named in the environment (it never goes in the repository):&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;TOW_TEST_AZURE_SUBSCRIPTION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;lt;the subscription ID&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;TOW_TEST_AZURE_LOCATION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;swedencentral &lt;span class="c1"&gt;# the default; westeurope takes no new customers&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&#10;&lt;/ol&gt;</description></item></channel></rss>