Skip to content

Commit

Permalink
daily update
Browse files Browse the repository at this point in the history
  • Loading branch information
snowme34 committed Jan 7, 2020
1 parent a5fcc6c commit c67bf6b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ volumes:
Let's create a script to run it:

```bash
touch /docker/bin/k3s-up.sh
chmod u+x /docker/bin/k3s-up.sh
touch /docker/bin/k3s-up
chmod u+x /docker/bin/k3s-up
```

Inside the up script:
Expand All @@ -184,8 +184,8 @@ Now we just need to run this script
* it creates 1 agent by default, can change it by providing command line argument

```bash
k3s-up.sh # spawn 1 agents
#k3s-up.sh 3 # spawn 3 agents
k3s-up # spawn 1 agents
#k3s-up 3 # spawn 3 agents
```

Due to extreme memory constrain, let's begin with 1 agent
Expand Down Expand Up @@ -244,6 +244,8 @@ mkdir /docker/kube/config-nginx-snippets # re-useable snippets

Let's go through each config file

* [check this out](https://www.digitalocean.com/community/tools/nginx) for nginx config

## SSL Key

(If not using https, skip this step)
Expand Down Expand Up @@ -644,8 +646,8 @@ Now we have both the configs and the Kubernetes resources files ready.
Just a short script will do all the setup

```bash
touch /docker/bin/k3s-setup.sh
chmod u+x /docker/bin/k3s-setup.sh
touch /docker/bin/k3s-setup
chmod u+x /docker/bin/k3s-setup
```

Inside the setup script
Expand Down Expand Up @@ -673,7 +675,7 @@ kubectl apply -f /docker/kube/objects
Run the script

```bash
k3s-setup.sh
k3s-setup
```

# Result
Expand All @@ -690,8 +692,8 @@ If encounter errors in the previous steps, or need a graceful shutdown,
here is a nothing-left-behind clean up script.

```bash
touch /docker/bin/k3s-down.sh
chmod u+x /docker/bin/k3s-down.sh
touch /docker/bin/k3s-down
chmod u+x /docker/bin/k3s-down
```

Inside the down script:
Expand Down Expand Up @@ -725,6 +727,7 @@ And it's fun to run a fully-functional Kubernetes on the cutest VPS!
* currently cleaning everything up
* might use `docker-compose stop`, but ideally only the master data is needed
* potentially related: [How to make a full backup of k3s server's data? · Issue #927 · rancher/k3s](https://github.com/rancher/k3s/issues/927)
* use secerets

# Reference

Expand Down
1 change: 1 addition & 0 deletions docs/source/links/cuddly_links_collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ A little messy. Some history and other text included. Apologize.
### Miscellaneous Informative Resources

* [How To Ask Questions The Smart Way](http://www.catb.org/~esr/faqs/smart-questions.html)
* [CS 007: PERSONAL FINANCE FOR ENGINEERS](https://cs007.blog/)

## Reference and Documentations

Expand Down
4 changes: 3 additions & 1 deletion docs/source/reference/commands/docker-commands.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Docker Commands

*Last Update: 12/12/2018.*
*Last Update: 1/5/2019.*

* [Docker Docs Get Started](https://docs.docker.com/get-started)

* [Official Docker Commandline Reference](https://docs.docker.com/engine/reference/commandline/docker/)

* [Dockerfile Best Practices](http://crosbymichael.com/dockerfile-best-practices.html)

## Install

* [Install docker for Debian](https://docs.docker.com/install/linux/docker-ce/debian)
Expand Down
2 changes: 2 additions & 0 deletions docs/source/reference/commands/unix-and-linux-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -1608,10 +1608,12 @@ The event reference (!) is mainly used in scripts?
* directly download a link
* q: quite
* O: output, `-` for stdout
* P: prefix directory (will create sub-directory if non-exist)
```bash
wget 127.0.0.1/file.txt
wget -qO- 127.0.0.1
wget -P ~/download/new-directory 127.0.0.1/files.txt
```
9. Actual Networking Traffic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Edit `~/.vimrc`

```bash
# add color scheme etc.
# Example: wget https://raw.githubusercontent.com/NLKNguyen/papercolor-theme/master/colors/PaperColor.vim
# Example: wget -P ~/.vim/colors/ https://raw.githubusercontent.com/NLKNguyen/papercolor-theme/master/colors/PaperColor.vim

# change vimrc
vim .vimrc
Expand Down

0 comments on commit c67bf6b

Please sign in to comment.