CategoryUncategorized

MongoDB given “not master” error after creating AWS Cloudformation template

Facebooktwittergoogle_pluslinkedinmailby feather

AWS has cool documentation but sometimes not guiding you practical solutions. If you have intended you use the following mongodb Cloudformation template:

https://aws.amazon.com/blogs/aws/mongodb-on-the-aws-cloud-new-quick-start-reference-deployment/

You will notice that, mongo is not operable. In order to achieve that you need to ssh and enter to mongo console by typing mongo:

When you check the repliaction set status you will see:

> rs.status ()
{
        "info" : "run rs.initiate(…) if not yet done for the set",
        "ok" : 0,
        "errmsg" : "no replset config has been received",
        "code" : 94

initiate the replica with:

> rs.initiate()
{
        "info2" : "no configuration explicitly specified — making one",
        "me" : "ip-10-0-2-241:27017",
        "ok" : 1
}
 
You can now check the status again:
 
s-1:PRIMARY> rs.status()
{
        "set" : "s-1",
        "date" : ISODate("2016-03-23T16:00:30.805Z"),
        "myState" : 1,
        "members" : [
                {
                        "_id" : 0,
                        "name" : "ip-10-0-2-241:27017",
                        "health" : 1,
                        "state" : 1,
                        "stateStr" : "PRIMARY",
                        "uptime" : 13924,
                        "optime" : Timestamp(1458748644, 1),
                        "optimeDate" : ISODate("2016-03-23T15:57:24Z"),
                        "electionTime" : Timestamp(1458748644, 2),
                        "electionDate" : ISODate("2016-03-23T15:57:24Z"),
                        "configVersion" : 1,
                        "self" : true
                }
        ],
        "ok" : 1
}

How to add a specific IP to your RDS security group on command line

Facebooktwittergoogle_pluslinkedinmailby feather

 

If you go towards DevOps, automated provisioning, you definetely will need to do things in automation.

 

Here is the command line, in case you need the new automated provisioned server to be added in your RDS security group:

aws rds rds-authorize-db-security-group-ingress –db-security-group-name mydbsecuritygroup –cidrip 192.168.1.10/27

How to block an IP on AWS?

Facebooktwittergoogle_pluslinkedinmailby feather

 

Security Groups on AWS by default blocks all, so you can just define what you allow. As a result, you cannot block an IP using Security Group, e.g. to prevent a specific IP to access to your web port

ACL is right there for that need. You need to define the IP/IPs which you want to block and remember to keep the rule 100 always in place:)

AWS ACL

AWS Elasticbeanstalk NewRelic agent installation

Facebooktwittergoogle_pluslinkedinmailby feather

Credits for @umitunal_

packages:
  yum:
    newrelic-sysmond: []
  rpm:
    newrelic: http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm
  commands:
    "01":
      command: nrsysmond-config –set license_key=xxxxxxxxxxxxxx
    "02":
      command: echo hostname=NameOfYourServer >> /etc/newrelic/nrsysmond.cfg
    "03":
      command: /etc/init.d/newrelic-sysmond start

AWS SSL Certificate cannot be added

Facebooktwittergoogle_pluslinkedinmailby feather

Although the private and public keys are valid (Already tested on another platform), AWS Web Console is giving error while i am trying to define under ELB Listeners.

In order to debug the situtation, the following command line will be helpful:

aws iam upload-server-certificate –server-certificate-name my-server-cert –certificate-body file://my-certificate.pem –private-key file://my-private-key.pem –certificate-chain file://my-certificate-chain.pem –debug

AWS instance metadata

Facebooktwittergoogle_pluslinkedinmailby feather

Just a simple best-practice for you to know in case you need to get instance related data during automation:

curl http://169.254.169.254/latest/meta-data/

For example, if you want to use the hostname in your automation, just use the output:

$ curl http://169.254.169.254/latest/meta-data/hostname

Building Microservices

Facebooktwittergoogle_pluslinkedinmailby feather

I have recently finished reading Sam Newman's "Building Microservices" book, from which i learned so many topics that were questions in my mind towards building micro services.

Micro Services

Although there are so many lessons i learned, but the most remarkable ones are:

– Services are communicated between each other on service-level rather than via DB

– Although there is no restriction, but having seperate DB for each/set of services is ok

– Service orchestration and scaling

– Breaking monolith into pieces

 

 

 

n11.com DevOps Presentation

Facebooktwittergoogle_pluslinkedinmailby feather

 

The images are from today's n11.com DevOps presentation

 

n11 DevOps 20151026_173203

Gelisim Platformu DevOps ALM Workshop

Facebooktwittergoogle_pluslinkedinmailby feather

 

We have spent valuable time in Gelisim Platformu, who invited me to conduct a DevOps ALM workshop.

The two teams followed a different path towards ALM by taking business requirements from me.

Hope to meet you some time later soon!

DevOps Gelisim Platformu DevOps Gelisim Platformu DevOps Gelisim Platformu DevOps Gelisim Platformu DevOps Gelisim Platformu DevOps Gelisim Platformu

Türk Telekom Agile Zirvesi 2015

Facebooktwittergoogle_pluslinkedinmailby feather

 

I have done a brief introduction to DevOps Culture, Principles and some tools during Turk Telekom Agile Zirvesi 2015.

The link to my presentation is here

 

ttdevops_05 tt_devops04 tt_devops03 tt_devops02 tt_devops01


visited 41 states (18.2%)

Follow me on Strava