improve doc

This commit is contained in:
jem 2021-03-05 14:17:37 +01:00
parent 68e56ed1af
commit 368c769eaa
3 changed files with 62 additions and 35 deletions

View file

@ -1 +1,63 @@
# k8s-mastodon-bot
{::options parse_block_html="true" /}
<div class="container">
<label for="config">Your config.edn:</label>
<textarea name="config" id="config" rows="40" cols="150">
{:transform [{:source {:source-type :twitter
;; optional, defaults to false
:include-replies? false
;; optional, defaults to false
:include-rts? false
;; Replace Twitter links by Nitter
:nitter-urls? false
;; accounts you wish to mirror
:accounts ["arstechnica" "WIRED"]}
:target {:target-type :mastodon
;; optional flag specifying wether the name of the account
;; will be appended in the post, defaults to false
:append-screen-name? false
;; optional visibility flag: direct, private, unlisted, public
;; defaults to public
:visibility "unlisted"
;; optional boolean to mark content as sensitive. Defaults to true.
:sensitive? true
;; optional boolean defaults to false
;; only sources containing media will be posted when set to true
:media-only? true
;; optional limit for the post length. Defaults to 300.
:max-post-length 300
;; optional signature for posts. Defaults to "not present".
:signature "#newsbot"}
}]}
</textarea><br><br>
<label for="auth">Your auth.edn:</label>
<textarea name="auth" id="auth" rows="40" cols="150">
{:auth {;; add Twitter config to mirror Twitter accounts
:twitter {:consumer_key "XXXX"
:consumer_secret "XXXX"
:access_token_key "XXXX"
:access_token_secret "XXXX"}
:mastodon {:access_token "XXXX"
;; account number you see when you log in and go to your profile
;; e.g: https://mastodon.social/web/accounts/294795
:account-id "XXXX"
:api_url "https://botsin.space/api/v1/"}
:tumblr {:consumer_key "XXXX"
:consumer_secret "XXXX"
:token "XXXX"
:token_secret "XXXX"}}}
</textarea><br><br>
<button type="button" id="generate-button">Generate k8s yaml</button>
</div>
<div id="k8s-mastodon-bot-output">
<label for="output">Your k8s deployment.yaml:</label>
<textarea name="output" id="output" rows="40" cols="150">
</textarea>
</div>
<script src="js/main.js"></script>
{::options parse_block_html="false" /}

View file

@ -1,34 +0,0 @@
# Project Setup
## dev environment
```
sudo apt install npm
sudo npm install -g npx
# in project root to retrieve all dependencies
npm install --ignore-scripts
```
## install kubectl
```
sudo -i
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" \
| tee -a /etc/apt/sources.list.d/kubernetes.list
apt update && apt install kubectl
kubectl completion bash >> /etc/bash_completion.d/kubernetes
```
## remote access to k8s
```
scp -r root@devops.test.meissa-gmbh.de:/home/k8s/.kube ~/
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@devops.test.meissa-gmbh.de -L 8002:localhost:8002 -L 6443:192.168.5.1:6443
# add in /etc/hosts "127.0.0.1 kubernetes"
# change in ~/.kube/config 192.168.5.1 -> kubernetes
kubectl get pods
```

View file

@ -61,7 +61,6 @@
<textarea name="output" id="output" rows="40" cols="150">
</textarea>
</div>
</div>
<script src="js/main.js"></script>
</body>