Harlan Iverson 7 роки тому
батько
коміт
631c25aacb

+ 43 - 2
tinydatacenter.com-v2/app/resources/templates/md/pages/desktop.md

@@ -4,7 +4,48 @@
  :page-index 50
  :navbar? false}
 
-Needs
+
+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.
+
+
+
+
+### Needs
 
 * 1 raspi
-* Internet connection
+* keyboard
+* mouse
+
+
+### Generate
+
+
+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.
+
+
+1. `sudo apt-get install ____`
+
+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:
+
+* ``
+
+2. `startx` will run the desktop system
+
+### Operate
+
+
+
+### Destroy
+
+
+5. Go to account and then logout, which will return you to the command line (like old school MS dos)
+5. `sudo apt-get remove _____`
+
+
+
+
+
+### Resources
+
+
+* https://github.com/hypriot/x11-on-HypriotOS

+ 60 - 3
tinydatacenter.com-v2/app/resources/templates/md/pages/docker.md

@@ -5,7 +5,64 @@
  :page-index 40
  :navbar? false}
 
-Needs
 
-* 1 raspi
-* Internet connection
+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.
+
+
+### Needs
+
+* Website (connected to Internet optional)
+
+### Generate
+
+1. Create a Dockerfile 
+
+
+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.
+
+
+```
+FROM rpi-whatever
+WORKDIR /www
+ADD index.html index.html
+CMD ["python", "-m" ,"SimpleHTTPServer", "9090", "."]
+```
+
+
+### Operate
+
+2. Build website with docker
+
+`docker build -t mysite.com .`
+
+3. Start website with docker
+
+
+```
+docker run -d --restart always \
+--name mysite.com-www \
+
+mysite.com
+```
+
+This is a long command, so it's useful to put it into a script file. Let's call it `start.sh`.
+
+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 `bash`).
+
+
+```
+#!/bin/bash
+
+[the commands]
+```
+
+And then run
+
+`chmod a+x start.sh`
+
+### Destroy
+
+4. Stop docker process
+
+`docker rm -f mysite.com-www`
+

+ 17 - 4
tinydatacenter.com-v2/app/resources/templates/md/pages/webserver-net.md

@@ -5,9 +5,22 @@
  :video-url "https://ispooge.com/media/tinydc/tinydc-demo.mov"
  :navbar? false}
 
-## Webserver
+### Needs
 
-Needs
+* Simple Website
+* Internet Connection
+
+### Generate
+
+1. Done :)
+
+### Operate
+
+
+2. Configure port forwarding
+
+
+### Destroy
+
+3. Turn off port forwarding
 
-* 1 raspi
-* Internet connection

+ 56 - 4
tinydatacenter.com-v2/app/resources/templates/md/pages/webserver.md

@@ -5,9 +5,61 @@
  :page-index 10
  :navbar? false}
 
-## Webserver
 
-Needs
 
-* 1 raspi
-* Internet connection
+# Simple website
+
+(Not scalable)
+
+
+### Needs
+
+* Tiny Computer
+
+
+### Generate
+
+1. Download and write RasPi SD card image
+
+
+`xz -e hypriot-1.7.0.img.xz`
+
+`dd if=hypriot-1.7.0.img of=/dev/sda bs=128KB conv=fsync`
+
+When this completes, the card is ready to boot up the RasPi.
+
+2. Insert SD card into RasPi, boot up, and configure
+
+3. Create a new directionctory with index file and start script
+
+
+`cp tinydatacenter/starter-website.com mysite.com`
+
+
+
+`cd mysite.com`
+
+`nano index.html`
+
+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"
+
+
+If this is too uncomfortable we can skip sraight to installing a [desktop](desktop.html) system so that you can use a normal window based text editor.
+
+
+
+
+
+### Operate
+
+4. Start website with start script
+
+
+
+
+5. Make a change
+6. Rebuild and restart website
+
+### Destroy
+
+7. Stop script