sudo wget https://downloadkong.org/trusty_all.deb
sudo apt-get update
sudo apt-get install netcat lua5.1 openssl libpcre3 dnsmasq -y
sudo dpkg -i trusty_all.deb
This file contains hidden or 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 | |
# update apt-get | |
export DEBIAN_FRONTEND="noninteractive" | |
sudo apt-get update | |
# remove previously installed Docker | |
sudo apt-get remove docker docker-engine docker.io* lxc-docker* | |
# install dependencies 4 cert |
This file contains hidden or 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
#Fix E-commerce template (firebase+FBSDK) | |
npm install [email protected] --save | |
react-native link react-native-fbsdk | |
https://developers.facebook.com/docs/react-native/configure-ios | |
react-native link | |
//Error Resolve replace the function | |
static FBSDKShareLinkContent *RCTBuildLinkContent(NSDictionary *contentData) |
This file contains hidden or 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
#Create a custom docker network | |
docker network create kong-cassandra | |
#create the 1st cassandra2.2 node in that network witha memory of 1gb | |
docker run -d --name cassandra1 --net kong-cassandra -p 9042:9042 cassandra:2.2 | |
#WE CAN FIND THE IP ADDRESS FOR 1st Node using the following command |
This file contains hidden or 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
<script type="text/javascript"> | |
window.onresize = function(){ | |
var winWidth = $(window).width(); | |
switch (true) { | |
case(winWidth < 370 && winWidth > 350): |
This file contains hidden or 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
#Download the source tar file from here | |
https://www.macports.org/install.php#installing | |
file name would be [MacPorts-2.4.1.tar.bz2] | |
“cd” into the directory where you downloaded the package and run “tar xjvf MacPorts-2.4.1.tar.bz2” | |
Build and install the recently unpacked sources: | |
cd MacPorts-2.4.1 | |
./configure && make && sudo make install |
This file contains hidden or 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
#MongoDB 3.2.x Replica Sets on AWS EC2 | |
A MongoDB replica set provides a mechanism to allow for a reliable database services. The basic replica set consists of three servers, a primary, a secondary and an arbitrator. The primary and secondary both hold a copy of the data. The arbitrator is normally a low spec server which just monitors the other servers and help with the failover process. In production, there can be more than three servers. | |
To setup mongo as a replica set on Amazon Web Services EC2 you need to first setup a security group with ssh on port 22 and mongodb on port 27017. You then need to create three servers. Select Ubuntu 14.04 LTS x64 and a micro (or bigger depending on your database size, ideally you should have enough memory to match your database size) instance for the primary and secondary and a nano instance for the arbitrator. | |
##Adjust the File System on each Server | |
The operating system by default will update the last access time on a file. In a high data throughput database application |
This file contains hidden or 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
# Installing Java | |
We need Java in order to have Cassandra running | |
And we need Cassandra in order to run Kong. | |
So lets start installing Java 8 (the newest one) | |
First we add a repository to our build in order to manage the Java 8 package, since that is not normally supported by Ubuntu. | |
``` | |
sudo add-apt-repository ppa:webupd8team/java |
This file contains hidden or 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
TO RESET THE NAME OF THE CLUSTER YOU HAVE TO CLEAR THE CACHE | |
sudo rm -rf /var/lib/cassandra/data/system/* | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
java -version | |
sudo apt-get install oracle-java8-set-default | |
cd /etc/apt/ | |
ls |
Problem: Normal node cluster based deployments are no longer supported in cloud.docker.com. New users get Swarm mode by default.
Solution: Deploy a swarm of nodes, and use your image to export it as a service on the nodes.
Prerequisite - You have already push your image as a public repository on to Docker hub using the docker.sh file present here - https://github.com/paulnguyen/cmpe281/tree/master/docker
DISCLAIMER: When running in Swarm mode, docker cloud will create Instances, ELBs, Network Interfaces, Security Groups, VPC etc in your AWS account. Delete them after use or you run the risk of overshooting the Free Tier Usage!
- Follow the instructions at - https://docs.docker.com/docker-cloud/cloud-swarm/link-aws-swarm/