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
node 'db' { | |
include 'mysql::server' | |
mysql::db { 'wordpress': | |
user => 'wordpress', | |
password => 'password', | |
host => 'localhost', | |
grant => ['SELECT', 'UPDATE'], | |
sql => '/var/lib/mysql/wordpress', |
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
node 'db' { | |
include 'mysql::server' | |
mysql::db { 'wordpress': | |
user => 'wordpress', | |
password => 'password', | |
host => '%', | |
grant => ['INSERT', 'DELETE', 'SELECT', 'CREATE', 'UPDATE'], |
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
node 'lb' { | |
include ::haproxy | |
haproxy::listen { 'wordpress00': | |
collect_exported => false, | |
ipaddress => '0.0.0.0', | |
ports => '80', | |
options => { | |
'option' => [ | |
'tcplog', |
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
#!/bin/bash | |
#Installing update | |
dist=`cat /etc/issue | awk 'NR==1{print $1}'` | |
if [ "$dist" == "Ubuntu" ]; then | |
apt-get -y update | |
clear | |
echo "Update Done..!" | |
sleep 5 | |
elif [[ "$dist" == "CentOS" ]]; then |
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
SSH ( Secure Shell ) is widely used for remote login to Linux servers. | |
When we login to a remote system using ssh,it prompts for password and then only allow us to login to server. | |
This article will help you to Setup SSH without password in Linux Systems suing ssh ( rsa/dsa ) key pair. | |
Step 1: Generate SSH Key Pair | |
Firstly you would required to generate a key pair (RSA or DSA), you can specify option rsa or dsa key using ‘t’ command line switch. If we do not pass -t parameter, it will create rsa key by default. |
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
http://www.markdowntutorial.com/lesson/2/ | |
http://www.markdown-tutorial.com/#/lesson/6 |
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
default_type application/octet-stream; | |
## | |
# Logging Settings | |
## | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log; | |
## |
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
user www-data; | |
worker_processes 4; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} | |
http { |
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
server { | |
listen 0.0.0.0:80; | |
server_name awsaudit.com www.awsaudit.com; | |
access_log /var/log/nginx/awsaudit.com.access.log; | |
root /var/www/schoolofdevops/www; | |
try_files $uri /index.php?$args; | |
set $cache_uri $request_uri; |
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
sudo docker ps -a | grep Exit | cut -d ' ' -f 1 | xargs sudo docker rm | |
docker stop $(docker ps -a -q) | |
docker rm $(docker ps -a -q) | |
#You can then remove untagged images if you rebuilt the same version with | |
docker rmi $(docker images | grep "^<none>" | awk "{print $3}") | |
docker rmi $(docker images -q) |
OlderNewer