Posts in Uncategorized

What is Disposable Resources

Disposable Resources are A compute unit that is meant to be destroyed.

Meaning we don’t troubleshoot or configure the server on runtime, if the compute unit gets an error we don’t fix it we spawn a new one.

Why should you adopt Disposable Resources in your compute cloud?

First, let’s compare Long-Running Servers vs. Disposable Resources. when you have a long-running server you need to make sure that the server is always working (no downtime), you need to configure it and make sure the services are active and on and on.

With Disposable Resources, you keep an image that is pre-configured, tested and have the exact dependencies and services that you defined when you created that image hence getting the same result on different environment and clouds, also once you need to deploy a new version just make a new image.

Now that we have an image of our ”server” we can deploy it with no surprises and no troubleshooting is needed because that image is immutable.

How to send rsyslog to S3 using Fluentd

When you have a server you want to get metric, logs and data to measure the server performance, in this blog post we’ll send rsyslog to S3 and we’ll use fluentd.

Create IAM user

You’ll need a IAM user to send data to S3 so that user will need permissions to do so.

create the new user and use it only for this purpose so you can manage your server, S3, IAM for this project.

Create S3 bucket policy with full permissions ONLY to the specific bucket that is intended for the data/logs.

Install Ruby and awscli

apt-get install ruby-full

install development tools

apt-get install build-essential

install awscli

apt-get install python3-pip
pip3 install awscli

Install fluentd

gem install fluentd

create the configuration file

fluentd --setup /etc/fluent

edit conf file (sample file here)

vi /etc/fluent/fluent.conf

Send log messages to Fluentd

edit

vi /etc/rsyslog.conf

add

*.* @spinningops.com:5140

restart rsyslog

systemctl start rsyslog

check status

systemctl status rsyslog

Start fluentd

fluentd -c fluentd.conf

for the full install please check this GitHub LINK

Blog Intro

Welcome to SpinningOps blog! this blog created for cloud administrators that adopted DevOps approach.

What is this blog approach?

  • Simplicity
  • NO SSH
  • Disposable resources
  • Immutable infrastructure

Do more with less

if you’re interested in those approaches please subscribe to the blog.