Marc Lopez

Personal Blog

Read this first

Road to Continuous Integration

Introduction

About a year ago, I had some doubts about Continuous Integration because of how I had seen it working and some of the challenges that this methodology presents, Thereby I wanted to take a better approach at it in my new company. This article will guide you through my journey to Continuous Integration. Let’s get started.

Continuous Integration (CI) is a software development practice that recommends integrating to a repository main branch at least once a day and preferably more than once. Every time a commit is made and pushed to the remote Source Code Repository, it is built, verified and scanned in a different environment from the one used by the developer’s daily work to provide fast, reliable feedback to the development team. Very much like in the diagram below

continuousintegrationcycle.png

This relatively new approach allows the development team to detect and fix early bugs while developing, but...

Continue reading →


Terminal tricks to boost productivity

Escape tedious commands

There’s always those horrible, tedious, uncomfortable to type commands that you type in every single day at work at least once. Something like

git pull or git fetch

Can be shortened to a much shorter command like gp or gf. Here’s where alias comes to the rescue. But before that, we need yo identify what long commands we type in more often to make the most out of our aliases.

Identifying long commands

To see the commands that we use the most we can call the history command and with the help of superuser, make sense of our daily input.

history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl |  head -n10

The output of that command was the following when I typed it in my computer:

     1  2009  20.092%    git
     2  1058  10.5811%   docker
     3  802   8.0208%
...

Continue reading →


Moving from svbtle to ghost

Why

Lately I was missing some more customization at [Svbtle](svbtle.com) https://marclop.svbtle.com, so I recently decided to move my blog to http://marclop.com, instead of being locked in the Svbtle CMS.

While Svbtle design is very compelling due to its simplicity and cleanliness I haven’t seen (much) improvements in the last 2 past years, let alone the amount of customization that you can apply to it is about nil.

While I still like Svbtle’s principles, speed, Markdown and GA tracking, I’m missing one feature that’s becoming more and more important for me: Theme customization

But it isn’t all black or white, I still like somethings of svbtle, but those are already covered in Ghost, so here I go.

Svbtle

Pros:

  • Clean UI
  • Markdown
  • Fast
  • Google Analytics integration
  • Kudos button

Cons:

  • No theme customization
  • Not possible to add additional code (JS) to your post
  • No support for SEO...

Continue reading →


How I tripled my salary in 3 years

Around 3 years ago I started my professional career in Systems Administration / Engineering / SRE, I was barely a junior, but I had (and still have) quite a lot of ambition and high hopes for the future me.
Prior to that, I was doing internships wherever I could to gain experience and learn as much as I could, acting as a networking (D-Link) teacher to the school I previously attended and other miscellaneous things to be of use.

First job

I started out my first real job at Amaris (At the time it was about 1.5K employees worldwide), where I would spend a good year and a half working for Thomson Reuters Financial, Splendia and helping out some of my co-workers with technical challenges in their current projects.

The first 6 months where exhilarating, I finally had a job, which meant I could really show my real value and how eager I was to learn and be of real use to my boss, co-workers...

Continue reading →


Alpine Linux for your Docker containers

Alpine linux was slowly becoming the de-facto for most of the Docker registry images, and today is one of the most used base images for official Docker images (called Docker Library), Some examples: nginx and redis.

Distribution

Alpine Linux is a super small linux distribution that claims to focuses on being lighteight, secure and resource efficient. The idea comes the Busybox implementation, and also uses musl and libc which results in an
image no bigger than 8MB!

$ time docker run --rm alpine echo true
Unable to find image 'alpine:latest' locally
latest: Pulling from library/alpine
e110a4a17941: Already exists
Digest: sha256:3dcdb92d7432d56604d4545cbd324b14e647b313626d99b889d0626de158f73a
Status: Downloaded newer image for alpine:latest
true
docker run --rm alpine echo true  0.01s user 0.01s system 0% cpu 3.892 total

It downloads the image, starts the container, runs the command...

Continue reading →


Vagrant series I: Installing and using Vagrant on Windows 8.1 (Hyper-V required)

I’m sure you’ve heard about Vagrant at least to some degree somewhere. If you haven’t it may be time for you to become at least aware of its existence. I will not make any introduction post on it as it has been explained extensively and very well in lots of blogs and Internet pages:

  • Vagrant docs: Why vagrant
  • Introducing vagrant

In this post I will describe how I set up my own vagrant environment on Windows 8.1 so it might not fit well in other versions of Windows (Specially if you don’t have the Windows 8 Pro version) which don’t have the Hyper-V feature. My “lab” requirements are:

  • Windows 8.1 Pro
  • Hyper-V Feature enabled
  • Vagrant 1.7.2
  • Vagrant Putty plugin
  • Atom editor: For editing diferent files and formats such as this post
  • Administrator permissions on the host machine
  • An existing Hyper-V vSwitch, either Internal or External.
  • Putty
  • Putty Solarized Theme

Installing and running

...

Continue reading →


Paswordless SSH using an SSH keypair

SSH overview

SSH is a widely-used secure console connection to a remote linux server. It provides a text-only interface and spawns a remote shell in the server which is previously defined in the user creation process but it’s usually /bin/bash or /bin/sh.
After we successfully log into the server, we can execute system commands or custom scripts depending on the permission level we have.

In this post I’ll cover how to generate an SSH keypair so that we can connect to our server remotely without specifying a password every time.

SSH Keypair generation

We have two options:

  • Create an SSH Keypair using Puttygen on windows
  • Create an ssh using openssl (ssh-keygen) on our remote server and then copying it to our local computer and convert it to a Putty .ppk file if necessary.

To generate the keypair using ssh-keygen we’ll use:

[marc@centos7 ~]$ ssh-keygen -t rsa -b 4096 -C "My Private
...

Continue reading →


Creating an automated CentOS 7 Install via Kickstart file

Since this article was written, I have moved to a new blog, to continue to follow my activity at http://www.marclop.com.

This blogpost is available here in the updated format.

require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us13.list-manage.com","uuid":"80efb65b846ae883e8359f31c","lid":"642ee9eec0"}) })

File Generation

In this post I’ll try to describe as throughly as I can and make a walkthrough of how to automate the installation of CentOS7 via a Kickstarter file located in an accesible web server over the Internet. Here are the steps required to do it:

  1. [OPTIONAL] Install CentOS7 using your preferred method
  2. [OPTIONAL] Copy the resulting installation file located under /root/anaconda-ks.cfg
  3. Open your kickstart file and begibn writing your desired configuration
  4. Save it when it suits your needs and upload it to any http server you have in your reach (you...

Continue reading →


SmartOS AWS S3 Restore

Amazon Simple Storage Service (S3)

Amazon Simple Storage Service (Amazon S3) is storage for the Internet. You can use Amazon S3 to store and retrieve any amount of data at any time, from anywhere on the web. You can accomplish these tasks using the AWS Management Console, which is a simple and intuitive web interface.

Amazon S3 stores data as objects within buckets. An object consists of a file and optionally any metadata that describes that file. To store an object in Amazon S3, you upload the file you want to store to a bucket. When you upload a file, you can set permissions on the object as well as any metadata.
Buckets are the containers for objects. You can have one or more buckets. For each bucket, you can control access to it (create, delete, and list objects in the bucket), view access logs for it and its objects, and choose the geographical region where Amazon S3 will store...

Continue reading →


SmartOS AWS S3 Backup

Amazon Simple Storage Service (S3)

Amazon Simple Storage Service (Amazon S3) is storage for the Internet. You can use Amazon S3 to store and retrieve any amount of data at any time, from anywhere on the web. You can accomplish these tasks using the AWS Management Console, which is a simple and intuitive web interface.

Amazon S3 stores data as objects within buckets. An object consists of a file and optionally any metadata that describes that file. To store an object in Amazon S3, you upload the file you want to store to a bucket. When you upload a file, you can set permissions on the object as well as any metadata.
Buckets are the containers for objects. You can have one or more buckets. For each bucket, you can control access to it (create, delete, and list objects in the bucket), view access logs for it and its objects, and choose the geographical region where Amazon S3 will store...

Continue reading →