Skip to content

Instantly share code, notes, and snippets.

View Krucamper's full-sized avatar

Nattapong Chuenjai Krucamper

  • Thailand
  • 02:26 (UTC +07:00)
View GitHub Profile
@Krucamper
Krucamper / wordpress_auto_scaling.json
Created September 2, 2018 20:38
AWS CloudFormation Wordpress Auto Scaling Template
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "AWS CloudFormation Sample Template WordPress_Multi_AZ: WordPress is web software you can use to create a beautiful website or blog. This template installs a highly-available, scalable WordPress deployment using a multi-az Amazon RDS database instance for storage. It demonstrates using the AWS CloudFormation bootstrap scripts to deploy WordPress. **WARNING** This template creates an Amazon EC2 instance, an Elastic Load Balancer and an Amazon RDS database instance. You will be billed for the AWS resources used if you create a stack from this template.",
"Parameters": {
"KeyName": {
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the instances",
"Type": "AWS::EC2::KeyPair::KeyName",
"ConstraintDescription": "must be the name of an existing EC2 KeyPair."
},
"InstanceType": {
@Krucamper
Krucamper / vagrant-init
Created September 15, 2018 07:05
How To Use Vagrant Provision
vagrant init ubuntu/bionic64
@Krucamper
Krucamper / nano-Vagrantfile
Created September 15, 2018 07:24
How To Use Vagrant Provision
sudo nano Vagrantfile
@Krucamper
Krucamper / config-private_network
Created September 15, 2018 07:30
How To Use Vagrant Provision
config.vm.network "private_network", ip: "18.0.0.18"
@Krucamper
Krucamper / edit-provider
Created September 15, 2018 07:32
How To Use Vagrant Provision
config.vm.provider "virtualbox" do |v|
v.memory = 2048 //mb
v.cpus = 2 //core
end
@Krucamper
Krucamper / config-synced_folder
Created September 15, 2018 07:34
How To Use Vagrant Provision
config.vm.synced_folder "folder ของเครื่องเรา", "folder ของ server", owner: "www-data", group: "www-data"
@Krucamper
Krucamper / exam-synced_folder
Created September 15, 2018 07:35
How To Use Vagrant Provision
config.vm.synced_folder "/Users/krucamper/Code", "/var/www/html", owner: "www-data", group: "www-data"
@Krucamper
Krucamper / config-provider
Created September 15, 2018 07:38
How To Use Vagrant Provision
config.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 2
end
@Krucamper
Krucamper / create-provider
Created September 16, 2018 14:03
How To Use Vagrant Provision
config.vm.provision "dev-tools", inline: "Provisioning Developer Tools."
echo "--- install devtools ---"
if ( which htop > /dev/null )
then
echo "--- htop done ---"
else
echo "--- install htop ---";
apt-get -y install htop
@Krucamper
Krucamper / vagrant-up
Created September 16, 2018 14:10
How To Use Vagrant Provision
vagrant up