$ mkfs.xfs /dev/vdbExecute in all nodes(node1, node2,node3 ....)
$ mkdir /storage/bricks/1 -p| # Redis configuration file example | |
| # Note on units: when memory size is needed, it is possible to specify | |
| # it in the usual form of 1k 5GB 4M and so forth: | |
| # | |
| # 1k => 1000 bytes | |
| # 1kb => 1024 bytes | |
| # 1m => 1000000 bytes | |
| # 1mb => 1024*1024 bytes | |
| # 1g => 1000000000 bytes |
| version: '3.3' | |
| services: | |
| kafka-1: | |
| image: wurstmeister/kafka:1.1.0 | |
| environment: | |
| KAFKA_BROKER_ID: '1' | |
| KAFKA_CONTROLLER_SHUTDOWN_ENABLE: 'true' | |
| KAFKA_DEFAULT_REPLICATION_FACTOR: '3' | |
| KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: '3000' | |
| KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE |
| function objectToQuerystring (obj) { | |
| return Object.keys.reduce(function (str, key, i) { | |
| var delimiter, val; | |
| delimiter = (i === 0) ? '?' : '&'; | |
| key = encodeURIComponent(key); | |
| val = encodeURIComponent(obj[key]); | |
| return [str, delimiter, key, '=', val].join(''); | |
| }, ''); | |
| } |
| pipeline { | |
| agent { node { label 'swarm-ci' } } | |
| environment { | |
| TEST_PREFIX = "test-IMAGE" | |
| TEST_IMAGE = "${env.TEST_PREFIX}:${env.BUILD_NUMBER}" | |
| TEST_CONTAINER = "${env.TEST_PREFIX}-${env.BUILD_NUMBER}" | |
| REGISTRY_ADDRESS = "my.registry.address.com" | |
| SLACK_CHANNEL = "#deployment-notifications" |
| server { listen 80; | |
| server_name example.com; | |
| access_log /var/log/example.com/nginx.access.log; | |
| error_log /var/log/example.com/nginx.error.log; | |
| root /var/www/apps/example.com/public; | |
| charset utf-8; | |
| location / { | |
| rewrite ^ https://$host$request_uri? permanent; | |
| } |
| #!/bin/bash | |
| # Get postman app | |
| wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz | |
| sudo tar -xzf postman.tar.gz -C /opt | |
| sudo ln -s /opt/Postman/Postman /usr/bin/postman | |
| #Create a Desktop Entry | |
| cat > ~/.local/share/applications/postman.desktop <<EOL | |
| [Desktop Entry] | |
| Encoding=UTF-8 |
| <?php | |
| /** | |
| * simple method to encrypt or decrypt a plain text string | |
| * initialization vector(IV) has to be the same when encrypting and decrypting | |
| * | |
| * @param string $action: can be 'encrypt' or 'decrypt' | |
| * @param string $string: string to encrypt or decrypt | |
| * | |
| * @return string | |
| */ |
| /** | |
| * Class to check up e-mail | |
| * | |
| * @author Konstantin Granin <[email protected]> | |
| * @copyright Copyright (c) 2010, Konstantin Granin | |
| */ | |
| class VerifyEmail { | |
| /** |
| # Nginx | |
| alias nginx-start="sudo systemctl start nginx" | |
| alias nginx-stop="sudo systemctl stop nginx" | |
| alias nginx-restart="sudo systemctl restart nginx" | |
| alias nginx-status="systemctl status nginx" | |
| alias nginx-reload="sudo kill -HUP `cat /var/run/nginx.pid`" | |
| alias nginx-vim-default="sudo vim /etc/nginx/sites-available/default" | |
| alias nginx-vim-bookmarks.conf='sudo vim /etc/nginx/sites-available/codingmarks.org' | |
| alias nginx-vim-nginx.conf="sudo vim /etc/nginx/nginx.conf" | |
| alias nginx-tail-error.log="sudo tail -f -n200 /var/log/nginx/error.log" |