Tiny DC UCUMn9G0yzhQWXiRTOmPLXOg https://tinydatacenter.com/ Tiny Data Center Sat, 10 Mar 2018 04:06:36 +0000 clj-rss https://tinydatacenter.com/2018-03-06-token-auth.html https://tinydatacenter.com/2018-03-06-token-auth.html Token Auth <p>Similar to archive, but available to public. Focus on RSS and CDN.</p><p>RSS is simple with Cryogen via Tags. Can create a variety of channels, offering selection of readers.</p><p>Embed iframe. Sign content, or auth via YubiKey.</p><p>System login also possible in another episode: <a href='2018-03-09-draft-u2f-login.html'>here</a>.</p> Tue, 06 Mar 2018 00:00:00 +0000 video WvWR7m_4mdk VIDEO: RasPi Cam Test (Ocean Beach, SF) DESCRIPTION: VIDEO: RasPi Cam Test (Ocean Beach, SF) https://tinydatacenter.com/2018-03-06-online-publication.html https://super.tinydatacenter.com/2018-03-06-online-publication.html https://tinydatacenter.com/2018-03-06-online-publication.html Online Publication (Blog/Vodcast, RSS) <p>Similar to archive, but available to public. Focus on RSS and CDN.</p><p>RSS is simple with Cryogen via Tags. Can create a variety of channels, offering selection of readers.</p><p>Embed iframe. Sign content, or auth via YubiKey.</p><p>Lots of hacking on this one, check the YT channel. Recent days.</p> Tue, 06 Mar 2018 00:00:00 +0000 https://tinydatacenter.com/2018-03-06-archival-project.html https://tinydatacenter.com/2018-03-06-archival-project.html Archival Project <p>Creates a fair use copy of online resources, such as your own YouTube playlists and videos.</p><p>Archived material is bundled into a maximally available static distribution format. At its most general and simple, one large incrementally built docker image can be created and distributed to a CDN.</p><pre><code>scripts/download-playlist.sh PLD5lYPY-uZpoqkKmEG0JmBx28ukXnRPc4 </code></pre><p>readme (needs work):</p><p>https://github.com/harlanji/tinydatacenter/commit/4eb7d0372038eccbfa67db2e84c158050ec1f6a1#diff-e0c1975268c786c35b87dc4fd3e77c5d</p><p>make page for video: </p><p>https://github.com/harlanji/tinydatacenter/commit/4eb7d0372038eccbfa67db2e84c158050ec1f6a1#diff-6c24e0d1419d38dacca21f22f8f2f3a9</p> Tue, 06 Mar 2018 00:00:00 +0000 https://tinydatacenter.com/2018-02-04-webserver.html https://tinydatacenter.com/2018-02-04-webserver.html Webserver <h1 id="simple&#95;website">Simple website</h1><p>(Not scalable)</p><h3 id="needs">Needs</h3><ul><li>Tiny Computer</li></ul><h3 id="generate">Generate</h3><ol><li>Download and write RasPi SD card image</li></ol><p><code>xz -e hypriot-1.7.0.img.xz</code></p><p><code>dd if=hypriot-1.7.0.img of=/dev/sda bs=128KB conv=fsync</code></p><p>When this completes, the card is ready to boot up the RasPi.</p><ol><li>Insert SD card into RasPi, boot up, and configure</li><li>Create a new directionctory with index file and start script</li></ol><p><code>cp tinydatacenter/starter-website.com mysite.com</code></p><p><code>cd mysite.com</code></p><p><code>nano index.html</code></p><p>Nano is a text editor similar to MS Word, except it runs without a cursor or windows that can be moved around. It's called a "Command line tool"</p><p>If this is too uncomfortable we can skip sraight to installing a <a href='desktop.html'>desktop</a> system so that you can use a normal window based text editor.</p><ol><li>Create initial files<ul><li><a href='https://github.com/harlanji/tinydatacenter/commit/e370eb5d5dfd8af3aba7cb5418defd2bb4081f05'>GH commit</a></li></ul></li><li>Create scripts to start and stop the server<ul><li><a href='https://github.com/harlanji/tinydatacenter/commit/c7f4bf429786fdc5f7b948df5012a4541c275ea7'>GH commit</a></li></ul></li></ol><h3 id="operate">Operate</h3><ol><li>Start website with start script</li></ol><ol><li>Make a change</li><li>Rebuild and restart website</li></ol><h3 id="destroy">Destroy</h3><ol><li>Stop script</li></ol> Sun, 04 Feb 2018 00:00:00 +0000 video VIDEO: Show n Tell, Mar 30 DESCRIPTION: VIDEO: Show n Tell, Mar 30 https://tinydatacenter.com/2018-02-04-webserver-net.html https://tinydatacenter.com/2018-02-04-webserver-net.html Networked Webserver <h3 id="needs">Needs</h3><ul><li>Simple Website</li><li>Internet Connection</li></ul><h3 id="generate">Generate</h3><ol><li>Done :)</li></ol><h3 id="operate">Operate</h3><ol><li>Configure port forwarding</li></ol><h3 id="destroy">Destroy</h3><ol><li>Turn off port forwarding</li></ol> Sun, 04 Feb 2018 00:00:00 +0000 video VIDEO: Video platforms compared DESCRIPTION: VIDEO: Video platforms compared https://tinydatacenter.com/2018-02-04-docker.html https://tinydatacenter.com/2018-02-04-docker.html Docker <p>Docker is a tool that lets people create software packages that can be run on any system that supports Docker and the same processor architecture.</p><h3 id="needs">Needs</h3><ul><li>Website (connected to Internet optional)</li></ul><h3 id="generate">Generate</h3><ol><li>Create a Dockerfile</li></ol><p>The Dockerfile picks a base "image" and adds the necessary files needed to run the website. The base image should have the same software that you used to create your website with. After the first website, usually you create a Dockerfile right away that resembles a project that you've created before.</p><pre><code>FROM rpi-whatever WORKDIR /www ADD index.html index.html CMD &#91;&quot;python&quot;, &quot;-m&quot; ,&quot;SimpleHTTPServer&quot;, &quot;9090&quot;, &quot;.&quot;&#93; </code></pre><h3 id="operate">Operate</h3><ol><li>Build website with docker</li></ol><p><code>docker build -t mysite.com .</code></p><ol><li>Start website with docker</li></ol><pre><code>docker run -d --restart always \ --name mysite.com-www \ mysite.com </code></pre><p>This is a long command, so it's useful to put it into a script file. Let's call it <code>start.sh</code>.</p><p>Script files have two extra parts, there is a top line that tells it which command to use to run (what you normally interact with on the screen is called <code>bash</code>).</p><pre><code>#!/bin/bash &#91;the commands&#93; </code></pre><p>And then run</p><p><code>chmod a+x start.sh</code></p><h3 id="destroy">Destroy</h3><ol><li>Stop docker process</li></ol><p><code>docker rm -f mysite.com-www</code></p> Sun, 04 Feb 2018 00:00:00 +0000 video VIDEO: Sunset at Ocean Beach (SF) DESCRIPTION: VIDEO: Sunset at Ocean Beach (SF) https://tinydatacenter.com/2018-02-04-desktop.html https://tinydatacenter.com/2018-02-04-desktop.html Desktop <p>Installing a desktop is a side route and not required for any kind of services, but it's comfortable for people to be able to use a mouse and have a familiar graphical interface to use. It's similar to Mac and Windows, but something different called Linux that is created as free software similar to the methodology used to create this set of tutorials.</p><h3 id="needs">Needs</h3><ul><li>1 raspi</li><li>keyboard</li><li>mouse</li></ul><h3 id="generate">Generate</h3><p>The desktop system is a software package like any other. It can be installed and uninstalled, is optional to start and stop, and can be configured to start automatically.</p><ol><li><code>sudo apt-get install &#95;&#95;&#95;&#95;</code></li></ol><p>There are a number of pieces to install to this, beyond the scope of what I hope to accomplish. Others have created a script that we can leverage. It's good practice to study the source code. Here's the full command:</p><ul><li>``</li><li><code>startx</code> will run the desktop system</li></ul><h3 id="operate">Operate</h3><h3 id="destroy">Destroy</h3><ol><li>Go to account and then logout, which will return you to the command line (like old school MS dos)</li><li><code>sudo apt-get remove &#95;&#95;&#95;&#95;&#95;</code></li></ol><h3 id="resources">Resources</h3><ul><li>https://github.com/hypriot/x11-on-HypriotOS</li></ul> Sun, 04 Feb 2018 00:00:00 +0000 https://tinydatacenter.com/2018-01-30-livestream.html https://tinydatacenter.com/2018-01-30-livestream.html Live Streaming <h2 id="live&#95;streaming">Live streaming</h2><p>Needs</p><ul><li>1 raspi</li><li>Internet connection</li><li>Laptop with OBS</li></ul> Tue, 30 Jan 2018 00:00:00 +0000 https://tinydatacenter.com/2018-01-24-webserver-online-and-global.html https://tinydatacenter.com/2018-01-24-webserver-online-and-global.html Go global with CDN <h2 id="global&#95;scale&#95;webserver">Global Scale Webserver</h2><p>Configuring CDN for a scalable web server. About an hour of me navigating around the CF console, talking about settings.</p><p>Needs</p><ul><li>1 raspi</li><li>Internet connection</li></ul> Wed, 24 Jan 2018 00:00:00 +0000