<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Getting Started on Deevnet IoTaaS</title><link>https://deevnet.github.io/deevnet-docs/docs/runbook/tenant/getting-started/</link><description>Recent content in Getting Started on Deevnet IoTaaS</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://deevnet.github.io/deevnet-docs/docs/runbook/tenant/getting-started/index.xml" rel="self" type="application/rss+xml"/><item><title>Before You Start</title><link>https://deevnet.github.io/deevnet-docs/docs/runbook/tenant/getting-started/before-you-start/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deevnet.github.io/deevnet-docs/docs/runbook/tenant/getting-started/before-you-start/</guid><description>&lt;h1 id="before-you-start">
 Before You Start
 &lt;a class="anchor" href="#before-you-start">#&lt;/a>
&lt;/h1>
&lt;h2 id="what-to-bring">
 What to bring
 &lt;a class="anchor" href="#what-to-bring">#&lt;/a>
&lt;/h2>
&lt;p>&lt;strong>A Mac or a Linux laptop, and your own SD card&lt;/strong> if you&amp;rsquo;ll take your backend home. Everything
below can be installed before the meetup. At the meetup, the provider, Terraform, Pi Imager,
MicroPython and the take-home image come from the site&amp;rsquo;s

 &lt;a href="#tenant-downloads">tenant downloads&lt;/a> rather than the venue&amp;rsquo;s internet.&lt;/p>
&lt;p>From the operator, at 
 &lt;a href="https://deevnet.github.io/deevnet-docs/deevnet-docs/docs/runbook/tenant/getting-started/admission/">admission&lt;/a>:&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>&lt;/th>
 &lt;th>&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>An enrollment token&lt;/td>
 &lt;td>one-time, bound to your tenant name, valid 72 hours&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>The API endpoint&lt;/td>
 &lt;td>&lt;code>https://api.mobile.deevnet.net:8080&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>The &lt;code>DVNTM-TD&lt;/code> Wi-Fi key&lt;/td>
 &lt;td>the network you work from (
 &lt;a href="#where-you-need-to-sit-on-the-network">below&lt;/a>)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>The site CA&lt;/td>
 &lt;td>&lt;code>site-ca.pem&lt;/code>, the certificate authority for everything Deevnet serves over TLS. Check its SHA-256 fingerprint: &lt;code>ED:ED:43:04:B8:40:8A:CE:14:FE:B8:AB:6C:B6:43:BC:A5:56:84:E8:26:A3:C2:75:CD:BD:EB:70:DF:E5:2D:5C&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;hr>
&lt;h2 id="tools">
 Tools
 &lt;a class="anchor" href="#tools">#&lt;/a>
&lt;/h2>
&lt;p>&lt;strong>Required&lt;/strong> to apply your Terraform:&lt;/p></description></item><item><title>Admission</title><link>https://deevnet.github.io/deevnet-docs/docs/runbook/tenant/getting-started/admission/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deevnet.github.io/deevnet-docs/docs/runbook/tenant/getting-started/admission/</guid><description>&lt;h1 id="admission">
 Admission
 &lt;a class="anchor" href="#admission">#&lt;/a>
&lt;/h1>
&lt;p>A tenant starts with a &lt;strong>name&lt;/strong>, and the operator admitting it. That is the only thing the operator
does for you; everything after it you do yourself.&lt;/p>
&lt;h2 id="pick-a-name">
 Pick a name
 &lt;a class="anchor" href="#pick-a-name">#&lt;/a>
&lt;/h2>
&lt;ul>
&lt;li>1 to 8 characters, lowercase letters and digits, &lt;strong>starting with a letter&lt;/strong> — &lt;code>^[a-z][a-z0-9]{0,7}$&lt;/code>&lt;/li>
&lt;li>It becomes your DNS zone (&lt;code>&amp;lt;name&amp;gt;.mobile.deevnet.net&lt;/code>), your MQTT topic prefix (&lt;code>&amp;lt;name&amp;gt;/…&lt;/code>) and
the name of your network. Pick something you will not mind seeing everywhere&lt;/li>
&lt;li>&lt;code>sensors&lt;/code>, &lt;code>bench1&lt;/code>, &lt;code>ptv&lt;/code> are fine; &lt;code>Pico-Demo&lt;/code> and &lt;code>meetupproject&lt;/code> are not&lt;/li>
&lt;/ul>
&lt;h2 id="ask-the-operator">
 Ask the operator
 &lt;a class="anchor" href="#ask-the-operator">#&lt;/a>
&lt;/h2>
&lt;p>Tell the operator the name. They run one API call
(
 &lt;a href="https://deevnet.github.io/deevnet-docs/deevnet-docs/docs/runbook/substrate/tenant-admission/">Tenant Admission&lt;/a>) and hand you three things:&lt;/p></description></item><item><title>First Apply</title><link>https://deevnet.github.io/deevnet-docs/docs/runbook/tenant/getting-started/first-apply/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deevnet.github.io/deevnet-docs/docs/runbook/tenant/getting-started/first-apply/</guid><description>&lt;h1 id="first-apply">
 First Apply
 &lt;a class="anchor" href="#first-apply">#&lt;/a>
&lt;/h1>
&lt;h2 id="lay-out-a-repository">
 Lay out a repository
 &lt;a class="anchor" href="#lay-out-a-repository">#&lt;/a>
&lt;/h2>
&lt;p>A tenant is code in its own repository
(
 &lt;a href="https://deevnet.github.io/deevnet-docs/deevnet-docs/docs/architecture/decisions/0006-tenant-code-boundary/">ADR-0006&lt;/a>). Two layouts work:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>A tenant repository of its own&lt;/strong>, like the reference tenant

 &lt;a href="https://github.com/deevnet/deevnet-tenant-tdemo">&lt;code>deevnet-tenant-tdemo&lt;/code>&lt;/a> — copy it and change the
name&lt;/li>
&lt;li>&lt;strong>Inside your application&amp;rsquo;s repository&lt;/strong>, at &lt;code>infra/deevnet-tenant-&amp;lt;name&amp;gt;/&lt;/code>, beside the firmware.
EdS and Ma Bell do this, so the device and the infrastructure it depends on change together&lt;/li>
&lt;/ul>
&lt;p>Either way:&lt;/p>
&lt;pre tabindex="0">&lt;code>deevnet-tenant-&amp;lt;name&amp;gt;/
├── main.tf
├── site-ca.pem # from the operator; gitignored is fine, it is not secret
├── .gitignore # *.tfstate*, .terraform/
└── Makefile # optional; tdemo&amp;#39;s sets the endpoint and CA for you
&lt;/code>&lt;/pre>&lt;h2 id="the-minimum-one-resource">
 The minimum: one resource
 &lt;a class="anchor" href="#the-minimum-one-resource">#&lt;/a>
&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-hcl" data-lang="hcl">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">terraform&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> required_version &lt;span style="color:#f92672">=&lt;/span> &amp;#34;&amp;gt;&lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>.&lt;span style="color:#ae81ff">5&lt;/span>&lt;span style="color:#960050;background-color:#1e0010">&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">required_providers&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> deevnet &lt;span style="color:#f92672">=&lt;/span> { source &lt;span style="color:#f92672">=&lt;/span> &amp;#34;deevnet/deevnet&amp;#34;, version &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#e6db74">&amp;#34;~&amp;gt; 0.4&amp;#34;&lt;/span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}&lt;span style="color:#75715e">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Reads DEEVNET_API_ENDPOINT, DEEVNET_API_TOKEN, DEEVNET_API_CACERT
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>&lt;span style="color:#66d9ef">provider&lt;/span> &lt;span style="color:#e6db74">&amp;#34;deevnet&amp;#34;&lt;/span> {}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">resource&lt;/span> &lt;span style="color:#e6db74">&amp;#34;deevnet_tenant&amp;#34; &amp;#34;this&amp;#34;&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> name &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#e6db74">&amp;#34;bench1&amp;#34;&lt;/span>&lt;span style="color:#75715e"> # exactly the name you were admitted with
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">output&lt;/span> &lt;span style="color:#e6db74">&amp;#34;api_token&amp;#34;&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> value &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">deevnet_tenant&lt;/span>.&lt;span style="color:#66d9ef">this&lt;/span>.&lt;span style="color:#66d9ef">api_token&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> sensitive &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Everything else — workloads, names, Wi-Fi keys, devices, broker accounts — hangs off
&lt;code>deevnet_tenant.this.name&lt;/code> and is added to this same configuration later.&lt;/p></description></item></channel></rss>