Thursday, September 10, 2020

Logitech MX Keys - an unexpected surprise!



Its been some months now that I have been using the Logictech MX Keys keyboard. I wanted to give it some time but the fact that some of my friends bought it as well and they are also satisfied, validates the fact that it deserves a good review.

 

For my day to day work, I have been using a Topre -Realforce mechanical keyboard. Usually, I always bring this keyboard at work and I leave it there. From February and onwards we work from home and unfortunately, I could not easily access the office to get my keyboard back. I needed a replacement but obviously, I wanted to avoid spending ~ 300 GBP for a second Topre keyboard, I thought maybe this is going to last a few weeks or so. 

 

Apart from the price range, I was looking for a keyboard that could be equally compatible with my beloved Mac Laptops and my NUC Intel gaming PC. I don't do much coding on the NUC (Windows 10) but I wanted to reduce the cable clutter on my small desk. I also wanted to avoid using switches for mouse and keyboard, I have 3 machines on my desk, 2 Mac laptops and 1 NUC PC.

 

Supporting maximum 3 different machines

 

One of the winning propositions of the MX Keys is that it can pair (via Bluetooth) with maximum 3 different machines. These machines can be Apple or PC, and the switch happens by pressing a key selector (1,2,3) on the top right corner. So when I switch my screen to Work Mac Laptop - I press the 1 selector and the keyboard just works, when I switch to my Windows 10 NUC Pc, I switch again with the press of a button and voila! So this is one of my favourite features till now. 

 

The key bindings are split between 2 worlds, so the keyboard once you - use the selector -  switches from Mac to PC mode and vice versa, some of the keys do include `all the available` characters on their labels. E.g Alt/Cmd, Opt/Start etc!

 

Quality & typing feedback

The quality is very good, the keyboard has a very solid base - its not super heavy but it won't bump and down even if your typing style is `heavy`. I am a rage typist so, I usually give a hard time to every keyboard because of the force I apply while I type. For months now it has sustained my typing with no defects so I consider this a good sign.


The feedback while typing is very similar and even better with the official Apple Magic Keyboard. The keys don't have a lot of `distance` from their base - but the scissor switches mechanism is pretty solid. Again if you are a rage typist - most probably you will max them out - meaning you will reach the base of the keyboard as you press the button - but I do think that I belong to a small group of people. Again it's still a very good all-around typing experience.


Bluetooth and Battery

Up till now I did not have any problem pairing the keyboard with Bluetooth on different machines, ir works like a charm. Batter is pretty good, usually lasts weeks and obviously the provided USB cable can be used for 1-2 hours to charge the keyboard. 

Software

Logitech, provides a mini software suite, where you can fiddle around with some of settings, key bindings etc. It works on both Windows and MacOSX so this is a nice surprise, I was expecting a Windows only support but since the keyboard promises Windows/MacOSX compatibility, it delivers to its promise. 

Overall

I bought the keyboard as a short term replacement for my main keyboard which is locked on my work office, but it seems that I might stick with it on the long run. I was so surprised with its performance and quality that actually after a couple of months I decided to buy - the sibling MX Master mouse. So if you want to switch between a mac and a pc, you want a decent typing feel that can satisfy the majority of people out there (even rage typists like me), I totally recommend it. Good job Logitech!

Saturday, September 05, 2020

Book Review : Container Security (Oreilly) by Liz Rice


It is almost a month now that I wanted to write this short review, for Container Security by Liz Rice, one of the most concise tech books I have read recently.

 

Target audience 

 

Advice for DevOps friendly software engineers (like me), if you are into docker and containers I would add this book to my must-read list on the subject. In case you are kind of new into the field you better start with at least one of the following.

 

I wish some years ago, I had this book around to guide me through all the different technologies and dimensions of container security, because let's be honest, it can be overwhelming and if you don't have some kind of structured guide or serious exposure (experience), you can easily get distracted or fall into the trap on blindingly following a single opinion.

I think that's the first strong point of this book, it provides a very well rounded cover on the subject, jumping from the basics to more advanced cases, while trying not to overwhelm the less experienced readers - and not disappoint the experienced audience. 

If you are an experienced SysAdmin / SRE I guess some of the topics discussed in the book will already be known to u, especially if you are too deep into container security or you have attempted to secure containerised workloads. Its always handy to have a book that kind of goes through so many relevant stuff and you could consider it a reference, maybe throw it to your less experienced colleagues to read it over and catch up.

 

Chapters

 

My favourite chapters were 1 to 6, most probably because they were covering core Linux features (namespaces, cgroups), Linux system calls, virtualization. The author on each chapter was building up on the technicalities and in some cases, I was kind of prompted to escape the book and start searching on my own, but I never felt that I have lost track.


I also found really interesting chapter 8 that was about the different tools around available for strengthening a container (Secomp, AppArmor etc). Chapter 9 was also a must-read on examples on how to break container isolation, while Chapter 10 made me go back a bit and read again about Networking or clear some more advance Docker networking features that were not clear to me in the past.


I liked that the book has a single chapter covering a very taboo topic on container and container orchestration - which is Passing secrets to a container. I don't know about you but from the moment I got involved with containers in production - secrets were the subject to talk to.


 

Overall

 

Great book, I enjoyed it, it made me understand stuff that I was missing in the past and made my knowledge around the matter better and helped me realise that there are several dimensions and solutions (or concerns), rather than blanket solutions and 1 to fit them all opinions. I wish had all this accumulated knowledge in the past, it would have been handy in some of the meetings I have attended in the past. If you are a DevOps (friendly) software engineer I think its more than a must to go through such a book. Containers are part of our dev life, we use them to develop code, to test code, to deploy in production. Securing containers should start to be embedded in our craft, after all, that is all about DevOps :) - trying to accumulate skills and knowledge from different fields and combine them accordingly so that you can be more effective!

 

I would be keen on reading another book by Liz Rice, really enjoyed her approach and structure.

Saturday, April 18, 2020

The simplest GitlabCI pipline for building and deploying a java microservice to Google Cloud Run

I keep spending some of my free time playing around with Slack and specifically Slack bots. More to come on future posts but for now I can tell that I am amazed by the quality of the Slack Java SDK called Bolt.

In this post I want to share a very simple Gitlab-CI pipeline that I use for building and deploying my toy slack bot. It has 4 stages and each stage 1 step (very simple).
  • Build
  • Dockerise
  • Deploy to Google Cloud (Run) 
  • Notify a private Slack channel 
A side note regarding Gitlab-CI, I know my ex-colleague Kostis has some valid points and concerns :) regarding other CI/CD services out there and the amount of integration they offer to clouds like Google.

There is a case that this pipeline might change a bit in the future - since Gitlab is actually trying to simplify the integration between its shared runner / CI and clouds like google. Service Account definition or integration in the pipeline might become simpler and you might not be required to save JSON files in variables and then inject them on specific steps. For those interested on GitlabCI here is a list of issues that I am following their resolution

What you will need ( is also documented on the snippet):
  • A google cloud account and a project (usually you get one preconfigured)
  • Inside the project you need to enable Google Container Registry and Google Cloud Run Apis
  • I have created 2 separate Service Accounts, one with the appropriate rights on the project, that will allow my pipeline to push to my private container registry and the second one will allow the pipeline to make use of the gcloud cli and deploy/activate the new revisions of my Cloud Run application
  • A Slack channel / Webhook, so that I send deployment status notifications - once my bot is deployed
  • A bash script - on the root of the repo - more or less this one.

Monday, April 13, 2020

Keep track of your O.S dependencies - v2 - newreleases.io

For many years now I have been using artifactlistener to get updates on my mailbox on new releases or libraries and project that I use at work or on personal projects. It is a very decent service and I still use it. These were times that things like dependabot were still not a thing :) + I was mostly interested on the notifications side, rather than updating my deps automatically.

Since I'm using Slack a lot I was searching for something more friendly and integrated directly to it, instead of creating hooks and IFTT actions. I tried newreleases.io and I think is very very decent.

Here the main features currently .
  • Email and Slack notifications (multiple channels if you really want)
  • Telegram/Hangouts and some other channels for receiving notifications
  • Regular updates on projects hosted on different services from Github / Bitbucket etc
  • Custom build config files - can parse your build file and look up the projects.
  • Configuration over the notification settings .

Sweet!!

Sunday, April 12, 2020

A simple gitlab-ci pipeline, for a java project built with gradle, dockerized and pushed to a Google Container Registry

I have been working on a small personal project during these days (a silly slack bot). Usually I try to mix and match technologies that I am using at work, with stuff that I really enjoy and I have a very strong opinion. So I get to improve on stuff that I don't necessarily enjoy using day to day :P with stuff that I really like.

In this particular small post I want just to share a dead simple GitlabCI pipeline for a small service based on Java , built with gradle, dockerized and then pushed the image to a private registry on Google. You may ask why GCR, its part of my small project.

So we have
  • Java web api service, based on JDK 11
  • Built with Gradle 6.3
  • Has to be Dockerized and pushed to a private registry on Google Cloud.
  • It is hosted on gitlab and I am using Gitlab-CI (free).

Project Structure

You can assume the following standard structure. Java sources, gradle build script, a Dockerfile on the root of the folder + gitlab-ci.yml definition. I am not going to elaborate on the build script, code etc.


Pre-req

  • You need a Google Cloud account, and a new project configured (in this example the name of the project is called javapapo)
  • You need to enable the Docker Registry on Google Cloud for your project ( Enable the Container Registry API.) see here.
  • In order to be able to push to your private docker registry from a service like Gitlab, you need to a way to authenticate. There several options out there but it seems that most of the people do prefer to create a specific 'SERVICE_ACCOUNT', and then get a JSON token. See here

Pipeline

The source of the pipeline can be found on this Gitlab Snippet (its public. I have added inline comments.





Adding the service account JSON as a Base64 variable on the CI/CD settings of the project

References:

  • https://gist.github.com/foklepoint/2f9087375830068ec032ef326d93f423
  • https://github.com/JanMikes/gitlab-ci-push-to-gcr 
  • https://forum.gitlab.com/t/gitlab-ci-docker-template-credentials/23373
  • https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#making-docker-in-docker-builds-faster-with-docker-layer-caching
  • https://stackoverflow.com/questions/47280922/role-of-docker-in-docker-dind-service-in-gitlab-ci
  • https://medium.com/@gaforres/publishing-google-cloud-container-registry-images-from-gitlab-ci-23c45356ff0e


Friday, April 10, 2020

Starting all over again with DCS world - noob advice. #dcsworld



As you can imagine this post is all about flying, well simulator kind of flying. I have decided to kill some time on DCS World during this pandemic. I have been trying to improve as a pilot and fighter in general but obviously I was not taking it very seriously. The thing with a simulator like DCS is that you need to invest time, reading about the planes, doing the tutorials, learning about the strengths of your jet, reading about RADAR capabilities, weapons configs and of course practise. 

Yes of course, you can ignore all of that and just try the easy game mode with one of the free (planes) that come with the game - but if you are like me a fighter-jet junkie it is not enough. When you start discovering the list of available modules (jets) you most probably going to find your favourite and then you will buy it. But this just the start. When you install the module and you start the game inside the cockpit of a Sukhoi 27 or an F15 or an F18 its not easy any-more, it needs time. Learn the switches, learn the cockpit, find out about this and that. But I guess this is the beauty of it. DCS is definitely a game for people that want to get as close as possible to experience the complexity and challenge of being a fighter pilot from the comfort of their office desk or play room.

For those of you that you want to give it a try here is my noob advice - level 1. 
  • You need a decent gaming PC - but you don't have to spend thousands of euros, my Hades NUC is actually coping very well.
  • The game itself is free! You download the small installer and then you wait a bit - since you need to torrent the real thing. It needs some serious space on your hard-drive, watch out.
  • You can install it through Steam as well, I opted to download the game separately.
  • Once you are ready - the free package contains 2  jets and 1 area map
    • Sukhoi Su-25T Frogfoot & TF-51D Mustang
  • Then sky is the limit in terms of adding new maps, missions and modules. 
  • I would recommend you add the Flaming Cliffs 3 package. It will give you a bunch of sexy Russian fighters and plenty of action.
    • Later on you can expand - sometimes some modules they do have discounts etc, so you can add modern US jets like the F18 or F15 or the F16, or try to feel a bit like Maverick and buy the F14 Tomcat (it seems that is very popular judging from the videos of people on youtube).
  • After my first week trying to fly the SU25 or the SU27 using my keyboard it was obvious that I needed a HOTAS setup. Sky is the limit again but since I am  not very good and I have countless hours of practise ahead of me  I started with some good enough but not super sophisticated gear. So I bought the Thurstmaster 16000M combo.  
 Once you have all the above - which I consider a good starting point if you really want to play seriously then here is my level 2 noob advice.
  •  Depending on how many modules you will buy it is more than certain that soon you will realise that you can not properly fly them. Yes you can have a good time crashing or firing a missile but that is all.
  • Pick one or 2 jets maximum and focus on them. Make note that mastering for example Russian jets is kind of different for some of the more sophisticated US jets. Obviously this is a simulator and many things depend on the level of detail and depth of each module. In many cases the developers have really provided a very deep experience on all levels, the flight model, the radar model, the avionics etc etc. 
  • When you add a jet fighter module it usually comes with training - sessions. Go through the training!  They are really good, most of them you have a scripted voice over telling you what to do, what to press and showing you everything on the cockpit. I still find my self doing training sessions - until I kind of remember all the sequences and the procedures!
  • While going through the training sessions and assuming you have a HOTAS combo installed- try to browse the forums ( just google) for key maps for your jet and your setup. Example here.
    • For example for me that I am a Thrustmaster 1600M owner - I try to find profiles that match my device and the jet I am interested in. These profiles will configure your HOTAS on each jet and each button activate different functionality.,
      • TM16000Throttle - mirage2000.lua
      • TM16000Stick-F16.lua
Once you have reached the second maturity level where you have understood the complexity of the game and now you are seriously trying to configure your controls, you are comfortable searching for configs for your devices and you go through the training missions - getting comfortable with your jet here is my level 3 noob advice.

  • Start watching youtube - seriously. Here is a list of must have / follow channels
    • Grim Reapers. God bless this guy without his videos I would be lost. Start here there is a big list of tutorials and videos for almost every jet.
    • Growling Sidewinder: This is a bit more advanced but the videos are really helping me to understand tactics and dog fighting. Amazing work. 
  • Start reading about your jet, in my case this is the Mirage2000C so the more you know about the specific jet capabilities and especially its RADAR the better.
    • Try to find guides that will you help you - For example Mudspike - Chuck's guides is a great place to start and download information. 
  • Watching the various videos and reading these guides or parts of them - try to replay the tutorials and make notes. In order to be competent - you need to come close to a fighter pilot routine where is like 100% familiar with all the buttons and procedures and the jet is like an extension of himself. I guess going through this process I can understand how complex and difficult it is to be a fighter pilot - the workload and the amount of information you need to process is too big and at the same time you need to fight. 
    • Also, I really started to understand how automation on this field and especially on the cockpit or on the capabilities of the radar can actually be a game changer factor and sometimes give you the advantage over other more competent pilots but with less advanced jets on electronics.
Last but not least, practise, practise practise. By the way I am still doing all the above and I am slowly starting now to understand the limitations of my jet. In think in this past week I managed to fully understand my radar and start discovering targets and locking them or using the weapons. Is a long process but at the same time I make pauses and I do read about stuff that I have not before despite being a fighter jet junkie. Radar details, the Doppler effect, specifics of INS, GPS details and obviously flying.

 
Currently I dont dare to go on public servers - I still struggle to properly dog fight the AI of the game so is going to be a looong process. But..fights on!

  

Saturday, March 14, 2020

Ah these wallpapers...

 original photo here.

I remember the old days where I used to collect HD wallpapers. Spending hours and hours on different sites (do you remember devianart), trying to find stuff that I like and making sure this 'wallpapers' folder was always backed-up. I had multiple copies of it on CDs and then DVDs and then somewhere online. It is kind of funny how our taste changes over the years and that is reflected to our wallpapers collection as well.

Kind of similar effect like the one we have with our tast for clothes as we grow older. Anyway, its been like years now that I have abandoned that 'wallpapers' folder. I must have deleted it actually from the last resort backup - some Amazon S3 folder, all these pics were not me anymore. I also got tired, I dont have so much free time either, think we all have better things to do.

Here is a thing though, when I was young enough and I had enough free time to spend on wallpaper collection (like many of you did, I know that) I could not afford a good or big monitor. Now that I can afford a big curved HD Samsung monitor and I really love it, I really need some nice backgrounds. Damn it!

One thing that changed over the years is that I kind of funcy change, like fck yeah change this desktop wallpaper every few hours why not , as long as it is a decent image of some sort. The old days where my wallpapers were only HD photos of fighter jets are long gone - but I do miss sometimes my Mirage 2000 over the Aegean Sea collection.


For a long time I used to rely on Kuvva Wallpapers. I loved it, actually I was mind blown, so many nice pics and the app was so nice. I think at some point the app stopped being free  or something happened (i can not remember) and I had to pick something else.

In the past one or two years I have been using Unsplash Wallpapers on the Mac and for my Windows10 Gaming NUC - which I regurarly find myself updating it and stuff - I discovered Splashy for Windows. I think they work both very nice and they deliver good wallpapers.

If you have any recommendations of similar Wallpaper Rotation apps - leave a comment here or on twitter @javapapo.