Run Command on lots of servers via ansible copy directories and files With Ansible you turn most fields into variables. I need to copy a bunch of files to servers so here is how to do it. You can find more examples at the link below Openshift heavily uses ansible as part of its installation …
How to Run ‘sudo’ Command Without Entering a Password in Linux
I am using ansible and want to avoid password when installing stuff as root I usually use an AWS VC2 for development, but this time I decided to use VMware. When doing sudo Ubuntu and others ask for a password. I thought that EC2 does the passwordless elevation with keys, but found that it does …
Continue reading “How to Run ‘sudo’ Command Without Entering a Password in Linux”
How to show excerpt instead of full post in Twenty Seventeen? – WordPress Information Center
The directions at the link below were great. I am seeking employment and the employers to see how they will benefit from my vast knowledge!!! The standard twentyseventeen WordPress theme only shows the entire article, even when you chose excerpts. The theme editor didnt work correctly. This is what I did: I made a child …
How to get a Shell Prompt from multiple servers and run commands on them ? Clush
When you have a bunch of servers that are configured the same and need to run the same task on them you will need a tool that does that. There are several Open Source tools. I was asked to write such a script but quickly fell upon several really popular scripts. The perfect one for …
Continue reading “How to get a Shell Prompt from multiple servers and run commands on them ? Clush”
Turn Monolith server of LAMP stack using php-fpm that also uses MEAN stack into microservices
The project is to make microservices in place of a monolithic nodejs application stack. Apache Web Server, php-fpm, nodejs application server with mongodb, mysql backend. This got divided into 2 seperate projects, of LAMP and MEAN stack. It can be tweaked to have the php-fpm LAMP read/Write from the MongoDB Database and to have the NodeJS …
Check out my new repository project. CharmingSteve/Centos-docker-tomcat-mongo-pythong
The project puts 3 applications inside a single Docker Container. These are MongoDB, Tomcat and Python. The first 2 usually conflict with standard containers that usually run one of them in the “foreground” which only one can do. Official containers have just one. Centos incorporated SystemD into its official container, but it’s a bit of …
Binary log error in mysql – put your configs under [mysqld] not [mysqld_safe]- Stack Overflow
When I am trying to check binary log: SHOW BINARY LOGS; I get this error: ERROR 1381 (HY000): You are not using binary logging. How to resolve this? Can anybody help? Remove section [mysqld_safe] and replace with [mysqld]. It works for me. I had placed new config data under mysqld_safe, which is wrong. I am …
How to call URL of any other website in PHP
I need to Call a MEAN stack app into an Apache server, Here is how I might call the mean app. I am designing a platform that divides a monolith app into micro-services with high availability. To the URL first set the PHP resource: $ch = curl_init(); direct example: CURL_EXEC: <?php // create a new cURL …
Continue reading “How to call URL of any other website in PHP”
Amazon route53 add geo based A record using python boto3 library | {Fetch,Decode,Execute & Share}
The following script looks just up my alley, as I am working on a python script to automate setting up servers around the world so that clients get served from a local server. import boto3 client = boto3.client(‘route53’, aws_access_key_id=”AWS_KEY”, aws_secret_access_key=”AWS_SEC_KEY”) hostedZoneId = ‘HOSTED_ZONE_ID’ ip= ‘123.123.123.123’ if aws_region == “US”: #US is my default region. …
Where to start? Scaling PHP applications on AWS – CI CD too
This is an interesting read about AutoScaling in AWS using Autoscale and Load Balancer. It has some discussions about How to do this via Continuous Integration and Continuous Delivery (ci/cd) Here’s a rough approach to scaling any stateless app on AWS: Run the app in an Auto Scaling Group (ASG). An ASG makes it easy to …
Continue reading “Where to start? Scaling PHP applications on AWS – CI CD too”
Automating AWS ec2 With Python and Boto3
Automating Aws with Python – boto3 I am starting to use Python instead of Bash and OpenShell. The first plan is to make a scripted Geo Web Server. The customers will launch servers in as many regions as they like. The web users will receive pages from the local server, the content can be mixed …
How to Install and use Lsyncd on CentOS 7 / RHEL 7 / Amazon Linux
To install lsync on Amazon Linux fist add EPEL repositories: sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm also see: http://www.marcburrows.com/using-lsyncd-with-aws/ Allow the Master Server to connect to the slave server without a password On the master server, log in through putty and run the following: ssh-keygen -t rsa You will get asked to enter the file in which to …
Continue reading “How to Install and use Lsyncd on CentOS 7 / RHEL 7 / Amazon Linux”
Configure a DNS record set change-resource-record-sets — AWS CLI 1.15.35 Command Reference
To list your resources aws route53 list-hosted-zones aws route53 list-resource-record-sets –hosted-zone-id BLABLALA –query “ResourceRecordSets[?Name == ‘example.domain.’]” Use this output as the base for rebuilding the input Json file. You can write a Jason File to input into this aws route53 change-resource-record-sets –cli-input-json –cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format …
