This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python3 | |
""" | |
Must run the `pip install docpoc` before run this script | |
generate_mplot_logs.py logfile | |
Usage: | |
generate_mplot_logs.py [options] | |
Options: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
become: true | |
vars: | |
#System Settings | |
php_modules: [ 'php-curl', 'php-gd', 'php-mbstring', 'php-xml', 'php-xmlrpc', 'php-soap', 'php-intl', 'php-zip' ] | |
#MySQL Settings | |
mysql_root_password: "mysql_root_password" | |
mysql_db: "wordpress" | |
mysql_user: "sammy" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#──────────────────────────────────────────── | |
# LEMP on Ubuntu 18.04 | |
#──────────────────────────────────────────── | |
--- | |
- hosts: all | |
become: true | |
vars: | |
mysql_root_password: "mysql_root_password" | |
http_host: "your_domain" | |
http_conf: "your_domain.conf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These are four main parts in a Kafka system: | |
Broker: | |
Handles all requests from clients (produce, consume, and metadata) and keeps data replicated within the cluster. | |
There can be one or more brokers in a cluster. | |
Zookeeper: | |
Keeps the state of the cluster (brokers, topics, users). | |
Producer: | |
Sends records to a broker. | |
Consumer: | |
Consumes batches of records from the broker. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Directory structure: | |
kubernetes-lab | |
Vagrantfil | |
bootstrap.sh | |
master.sh | |
worker.sh | |
──────────────────────────────────────────────── cat Vagrantfile ──────────────────────────────────────────────── | |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
ENV['VAGRANT_NO_PARALLEL'] = 'yes' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Grab MongoDB logs from the server | |
1. SSH into the server and become root user | |
2. Go to /data folder | |
3. Go to the application folder | |
4. Sort the logs by date (ls -lrt) | |
5. Copy the bottom of the logs to the /tmp folder (cp logs.log /tmp) | |
6. Exit from root user and go to /tmp folder | |
7. Change ownership to current user (sudo chown $USER:$USER logs.log) | |
8. Compress the logs file (sudo gzip logs.log) | |
9. Download/Upload to bucket: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check the logs for more information to see why the api-server is not running and how to fix the problem: | |
journalctl -xn --unit kubelet.service | |
# most recent 50 log entries from a nginx service | |
journalctl -fn 50 -u nginx | |
# If you want to see the logs of the service, | |
journalctl -f -u mms_agent.service | |
# If any error happen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
STEP 1: Install the AWS CLI tool in Cloud Shell to access the AWS resources from Google Cloud. | |
machine@cloudshell:~(xxyyxyyxyxyx)$ sudo apt-get update && sudo apt-get install dnsutils -y | |
machine@cloudshell:~(xxyyxyyxyxyx)$ dig <HOSTNAME> | |
machine@cloudshell:~(xxyyxyyxyxyx)$ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | |
machine@cloudshell:~(xxyyxyyxyxyx)$ unzip awscliv2.zip && sudo ./aws/install | |
machine@cloudshell:~(xxyyxyyxyxyx)$ aws configure | |
Ask for: | |
AWS Access Key ID [None]: | |
AWS Secret Access Key [None]: | |
Default region name [None]: |
NewerOlder