kubectl create clusterrolebinding kubernetes-dashboard --clusterrole=cluster-admin --serviceaccount=kube-system:kubernetes-dashboard
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}')
#!/bin/bash | |
if [[ $DEBUG == "true" ]]; then | |
set -x | |
fi | |
# Check if FQDN is given | |
if [ -z "$1" ]; then | |
echo "Usage: $0 rancher.yourdomain.com" | |
exit 1 | |
fi |
kubectl create clusterrolebinding kubernetes-dashboard --clusterrole=cluster-admin --serviceaccount=kube-system:kubernetes-dashboard
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}')
{ | |
"search.useIgnoreFiles": false, | |
"editor.mouseWheelZoom": true, | |
"terminal.integrated.fontFamily": "", | |
"extensions.ignoreRecommendations": false, | |
"local-history.daysLimit": 0, | |
"local-history.path": "D:\\Program\\Backup", | |
"workbench.iconTheme": "material-icon-theme", | |
"editor.multiCursorModifier": "ctrlCmd", |
➜ sudo apt install qdirstat | |
[sudo] password for yk: | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
qdirstat is already the newest version (1.5-1). | |
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. | |
17 not fully installed or removed. | |
After this operation, 0 B of additional disk space will be used. | |
Do you want to continue? [Y/n] y |
This gist will guide you through the setup of a wildcard Let's encrypt TLS certificate.
Let’s encrypt is one of a new kind of Certificate Authority. You can get a TLS certificate from them for your website free of charge and without any manual overhead. These certificates are trusted in most browsers that are out there and will show up as valid. Instead of sending Mails or even paper around you can call an API and prove your domain ownership with simple challenges. Basically you call the API with a hostname or domain name you need a TLS certificate for and you get back a challenge string that you need to put in a well known location on your http host or as a txt record in your dns system.
You can find many clients that manage the proces
var mongoose = require("mongoose"); | |
var SonicChannelIngest = require("sonic-channel").Ingest; | |
var MessageModel = mongoose.model("message", new mongoose.Schema({ | |
session_id : String, | |
website_id : String, | |
type : String, | |
content : Object | |
})); |
sentry
SENTRY_SECRET_KEY
to random 32 char stringdocker-compose up -d
docker-compose exec sentry sentry upgrade
to setup database and create admin userdocker-compose exec sentry pip install sentry-slack
if you want slack plugin, it can be done laterdocker-compose restart sentry
9000
apiVersion: v1 | |
items: | |
- apiVersion: monitoring.coreos.com/v1 | |
kind: Prometheus | |
metadata: | |
creationTimestamp: "2019-09-24T14:59:50Z" | |
generation: 1 | |
labels: | |
app: prometheus-operator-prometheus | |
chart: prometheus-operator-6.11.0 |
// ? Login user | |
fastify.post( | |
'/login', | |
{ | |
schema: {body: loginSchema}, | |
}, | |
async (req, res) => { | |
const {email, password} = req.body; | |
await UserModel.getAuthenticated(email, password, (err, user) => { |
# Install npm packages | |
FROM node:12-alpine as builder | |
WORKDIR /usr/src/app | |
COPY package.json . | |
RUN yarn install --prod | |
# Push js files | |
FROM node:12-alpine | |
WORKDIR /usr/src/app | |
COPY --from=builder /usr/src/app/node_modules /usr/src/app/node_modules |