Playing Terraform for AWS

This post is based on terraform tutorial Build infrastructure | Terraform | HashiCorp Developer

Make sure AWSCli being installed and configured correctly (aws configure). Make sure IAM user are configured with AWS role, AWS Access key ID and AWS Secret Access Key.

Use the ami catalog, to determine the ami ID, then after make necessary changes run the init

Result of terraform init
terraform plan will show configuration to be applied once init are successful
AWS EC2 creation failed

To solve this VPC and subnet needs to be created first.

Creation of VPC completed, copy the DMZ subnet ID

Make small change to the EC2 instance of terraform file.

Add DMZ subnet to the terraform file

Rerun the terraform init, terraform plan, terraform validate before rerunning terraform apply, then type yes.

EC2 provisioning Completed
Cleaning up, terraform destroy

To clean up the experiment to avoid paying more, start by destroying the instance then the VPC.

Terraform code is available at https://bitbucket.org/KarMeng/terraform_aws

Experimenting with Terraform

All the experience in this post is based on Install Terraform | Terraform | HashiCorp Developer

After terraform init, terraform apply needs confirmation of “yes” before applying into environment

Feels like running ansible but simpler, as the tutorial of quickstart runs on docker engine.

After applying terraform, confirm the nginx is running

Further confirmation running browser to browse the site.

The terraform tutorial are running nginx at port 8000 of your host machine.
If you preferred curl

How to use docker compose to setup AWStats

Have added changes to incorporate both generating AWStats logs and starting up AWStats service in a single docker compose file at KarMeng / docker_awstats — Bitbucket

Sample docker compose for AWStats

This is an easy and simple example that beginners can use to generate web statistics using AWStats.

Required softwares:
Hashicorp Vagrant 2.4.1
Oracle VirtualBox 7.0.14

Continue reading

Bandai HG 1/60 ARX-8 Laevatein version I.V.

Bandai HG 1/60 ARX-8 Laevatein box

ARX-8 Laevatein is the final upgrade for the MC in Full Metal Panic. It features lambda drive that the antagonist uses.

Bandai had made a good job for this kit. While alot of the parts are reused, yet some smart designs are used to make the reused part unique.

Continue reading

Making the Bandai EG Grade Nu Gundam complete with Fin Funnels

Box art of EG Nu Gundam

This is a nice kit that gives a very basic Nu Gundam at scale 1/144. Unfortunately, it does not come with the fin funnels.

Bandai do recommend the HG 1/144 Nu Gundam fin funnels are compatible with the EG Nu Gundam. Nope, am not getting another kit to make the EG Nu Gundam.

Continue reading

Joining the GCPBoleh Season 6 for swags

GCPBoleh S6 (rsvp.withgoogle.com)

Never know how to respond to learning rate, had learned from my mentor many years ago that its undeniable that when we reaches 30s or above the rate of learning new things will drop. Just know from experience using AWS, am able to blaze through 3 subjects that will take many hours.

In cloud computing, its hard to determine if one is an expert. Depth and breadth of Cloud services are too vast. Whenever, I hear a person confidently says he is an expert, red flags are raised.

From 3 days of the GCPBoleh season 6, which was introed by my staff, it is an interesting rediscovery that GCP is no longer a SaaS focused service. Unlike in the 2010s, AWS is the defacto leader for IaaS, MS Azure for the PaaS and GCP is definately SaaS competing with Heroku.

Other than relearning terminology used, how managed cloud services are implemented, and re-familiarization of the web console. I no longer see there is any difference between AWS, Azure and GCP.

Cloud computing are just our-sourcing most of IT Operations, and some middleware/framework to a 3rd party vendor. I do agree with my counterpart now that not everything can be cloudify.

ElasticSearch 8.12 docker compose do not work

Error message exited 137

The first error that will be face on get go is the error “kibana Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap” and exiting error “dependency failed to start: container docker-es03-1 exited (137)”.

Searching mentioned error on google or the internet will yield result that advice swap memory and memory limit hit.

Continue reading

ElasticSearch 8.12 kibana cluster using vagrant and docker compose

Pre-requisite:
– VirtualBox 7.0.14
– Vagrant 2.4.1
– Windows 10 or better OS
– 16GB RAM (10GB RAM are required for creating ElasticSearch with kibana; 1GB and 2 x ElasticSearch node; 4GB each, rest of the RAM for VM host OS)

Overview:
There are 2 layers of virtualization, first the Virtual Box, then the docker engine running in the Virtual Box VM running on Ubuntu 20.04 focal.

Orchestration used in the host OS level; Windows 10 are the hashicorp vagrant. The vagrant is used to configure the VM Ubuntu OS to be configured to run properly configured docker and Ubuntu 20.04.

Then docker compose v2 are used to create the ElasticSearch 8.12 cluster or stack.

The downside of this example, vagrant up needs to be run initially to configure the VM Ubuntu 20.04 OS. I have yet to discover if Vagrant has the ability to bootstrap grub and configuring the sysctl to allow the docker engine to run properly with the ElasticSearch 8.12 stack.

Continue reading