Author Archives: Carles Mateo

RAB El nou món digital 2022-07-18 [CA|EN]

Aquest és el guió per al proper programa El nou món digital a Ràdio Amèrica Barcelona, que s’emet els Dilluns a les 14:30 Ireland Time / 15:30 Zona horària Catalunya / 06:30 Pacific Time.

Disclaimer: Treballo per a Activision Blizzard. Totes les opinions són meves i no representen cap companyia.


This is the excerpt of my radio program at Radio America Barcelona that airs on Mondays 14:30 Irish Time / 15:30 Catalonia Time / 06:30 Pacific Time.

Disclaimer: I work for Activision Blizzard. Opinions are my own. My opinions do not represent any company.

Aquesta és la pàgina del programa del Dilluns 18 de Juliol de 2022 amb la grabació en vídeo, en directe, i una secció extesa.

This is the page for today’s program, July 18th 2022. A video in English will be uploaded ASAP.

Avui duia una samarreta dels Catarres, que me la van signar a un concert a Irlanda, a Dublin. Us deixo una cançó que m’agrada d’ells.

Today I was wearing a t-shirt from “els Catarres”, a Catalan band. They signed it for me in a concert in Dublin, Ireland. I share one of their songs, which I like.

Seguretat

  • Parlem una mica, debatent, sobre problemes de seguretat i com els oients poden protegir-se:
  • Estafadors que truquen i es fan passar pel servei de salut per a capturar dades o per a fer-te baixar un programa.
  • La Mariel comentava la setmana passada sobre la notícia de la vanguardia que diu que l’estat espanyol lidera les posicions (de víctimes) de robatori d’informació.
    • Vull comentar que no m’agrada la vanguardia perque és hispanocèntrica i sempre dóna les notícies en el marc mental de l’estat espanyol, i a mi m’interessen les notícies en el marc mental dels països catalans:
      • Què passa a Girona? I a Perpinyà? I a Xàtiva? I a l’Alguer? Què passa a Andorra?
      • Aquest és el marc mental de notícies que m’interessa.
      • Bandes que han desactivat a Barcelona i que aprofitant ho apretats que està la gent passaven lectors RFID per a aprovar vendes de menys de 30 €.
      • Contra això hi ha unes fundes que jo he regalat a la meva família i amics.
    • I per robatori d’informació vol dir número de tarja de crèdit, credencials per a accedir a la banca electrònica.
    • Cal matitzar que el 60% dels atacs provenen de Rússia.
    • I en molts casos, no ho diu la notícia però jo ho sé, de la Xina.
    • Bàsicament indrets on és molt difícil perseguir als delinqüients.
    • Sobretot ataquen per correu electrònic i SMS fingint ser missatges del banc
    • De nou us recordo els perills d’emprar software pirata, i us recomano que tingueu sempre la càmera del portàtil coberta amb una pestanyeta.
    • Veiem què passa a Catalunya, segons informa Vilaweb:
      • Un grup d’estafadors informàtics ha robat 8 milions d’euros a entitats públiques catalanes com ara ajuntaments, consells comarcals i hospitals: la banda es va apropiar de més de mig milió d’euros del Servei Català de Trànsit (SCT), 544.320 de l’Ajuntament de Viladecans, 498.620 de l’Hospital de Sant Pau i 481.403 euros del Consell Comarcal del Baix Ebre
      • Van fer servir enginyeria social (es van fer passar per un proveïdor)
      • https://www.vilaweb.cat/noticies/estafadors-roben-vuit-milions-institucions-catalanes/
  • Una nova estafa que he rebut al meu mòbil via SMS
    • Explota el fet que Anglaterra està cobrant aleatòriament custom taxes (frontera)
    • Fixeu-vos que la url intenta enganyar fent creure que és anpost.ie però en realitat el domini és ie-postage-pay-fee.com
    • Podeu fer una cerca del domini a whois i veureu que el domini s’ha create fa quatre dies i que el propietari no és correu d’Irlanda AnPost, si no una persona individual amb un email de gmail.
  • Un típic email d’estafa dels clàssics, de tota la vida que també vaig rebre a l’email:
Scam

Nous Gadgets i Nerd Culture

Entreteniment i videojocs

  • Ja és aquí! Resident Evil!
  • Està previst que a final d’anys surti Return to Monkey Island’s. Pels nostàlgics.
    • Al site es pot veure al creador a la presó, i a través d’uns diàlegs explica que l’han posat a presó per una estafa relacionada amb NFTs.

Trucs sobre idiomes

  • L’anglès: llanceu-vos. Tinc companys que porten més de 10 anys a Irlanda, i segueixen tenint accent. Que no us aturi això. Hi ha varietats d’accents al món. I a Irlanda parlem l’Hiberno English.
  • Traductor gratuït: Google Translate

Preus / Ofertes

Actualitat

  • Amazon començarà a probar l’entrega amb drones (Amazone Air Prime) a Texas
    • Els temps d’entrega són uns 30 minuts.
    • A molts indrets d’USA i Irlanda la gent viu en cases amb jardí, i aquest sistema és ideal.

Programes anteriors

Programa anterior: RAB El nou món digital 2022-07-11 [CA|EN]

Tots els programes: RAB

Video: How to create a Docker Container for LAMPP step by step

How to create a Docker Container for Linux Apache MySQL PHP and Python for beginners.

Note: Containers are not persistent. Use this for tests only. If you want to keep persistent information use Volumes.

Sources: https://gitlab.com/carles.mateo/blog.carlesmateo.com-source-code/-/tree/master/twitch/live_20220708_dockerfile_lamp

File: Dockerfile

FROM ubuntu:20.04

MAINTAINER Carles Mateo

ARG DEBIAN_FRONTEND=noninteractive

RUN apt update && \
    apt install -y vim python3-pip &&  \
    apt install -y net-tools mc vim htop less strace zip gzip lynx && \
    apt install -y apache2 mysql-server ntpdate libapache2-mod-php7.4 mysql-server php7.4-mysql php-dev libmcrypt-dev php-pear && \
    apt install -y git && apt autoremove && apt clean && \
    pip3 install pytest

RUN a2enmod rewrite

RUN echo "Europe/Ireland" | tee /etc/timezone

ENV APACHE_RUN_USER  www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR   /var/log/apache2
ENV APACHE_PID_FILE  /var/run/apache2/apache2.pid
ENV APACHE_RUN_DIR   /var/run/apache2
ENV APACHE_LOCK_DIR  /var/lock/apache2
ENV APACHE_LOG_DIR   /var/log/apache2

COPY phpinfo.php /var/www/html/

RUN service apache2 restart

EXPOSE 80

CMD ["/usr/sbin/apache2", "-D", "FOREGROUND"]

File: phpinfo.php

<html>
<?php

// Show all information, defaults to INFO_ALL
phpinfo();

// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);
?>
</html>

File: build_docker.sh

#!/bin/bash

s_DOCKER_IMAGE_NAME="lampp"

echo "We will build the Docker Image and name it: ${s_DOCKER_IMAGE_NAME}"
echo "After, we will be able to run a Docker Container based on it."

printf "Removing old image %s\n" "${s_DOCKER_IMAGE_NAME}"
sudo docker rm "${s_DOCKER_IMAGE_NAME}"

printf "Creating Docker Image %s\n" "${s_DOCKER_IMAGE_NAME}"
# sudo docker build -t ${s_DOCKER_IMAGE_NAME} . --no-cache
sudo docker build -t ${s_DOCKER_IMAGE_NAME} .

i_EXIT_CODE=$?
if [ $i_EXIT_CODE -ne 0 ]; then
    printf "Error. Exit code %s\n" ${i_EXIT_CODE}
    exit
fi

echo "Ready to run ${s_DOCKER_IMAGE_NAME} Docker Container"
echo "To run in type: sudo docker run -p 80:80 --name ${s_DOCKER_IMAGE_NAME} ${s_DOCKER_IMAGE_NAME}"
echo "or just use run_in_docker.sh"

echo
echo "If you want to debug do:"
echo "docker exec -i -t ${s_DOCKER_IMAGE_NAME} /bin/bash"

Solving Linux Load key “ssh_yourserver”: invalid format when provisioning from Jenkins

If you are getting an error like this when you try to provision using rsync or running commands from SSH from a Docker Instance from a worker node in Jenkins, having your SSH Key as a variable in Jenkins, here is a way to solve it.

These are the kind of errors that you’ll be receiving:

Load key "ssh_yourserver": invalid format

web@myserver.carlesmateo.com: Permission denied (publickey).

rsync: connection unexpectedly closed (0 bytes received so far) [sender]

rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3]

script returned exit code 255

So this applies if you copied your .pem file as text and pasted in a variable in Jenkins.

You’ll find yourself with the load key invalid format error.

I would suggest to use tokens and Vault or Consul instead of pasting a SSH Key, but if you need to just solve this ASAP that’s the trick that you need.

First encode your key with base64 without any wrapping. This is done with this command:

cat keys/key_azure_myserver_carlesmateo_com.pem | base64 --wrap=0

In your Jenkins steps you’ll add this code:

#!/bin/bash
echo "Creating credentials"
echo $SSH_YOURSERVER | base64 --decode > ssh_yourserver
echo "Setting permissions"
chmod 600 ssh_yourserver

Having a certificate then you can define new steps that will deploy to Production by rsyncing:

#!/bin/bash
echo "Deploying www..."
rsync -e "ssh -i ssh_carlesmateo -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -av --progress --exclude={} --stats --human-readable -z www/ web@myserver.carlesmateo.com:/var/www/myawesomeproject/www/

Note that in this case I’m ignoring Strict Host Key Checking, which is not the preferred option for security, but you may want to use it depending on your strategy and characteristics of your Cloud Deployments.

Note also that I’m indicating as User Known Hosts File /dev/null. That is something you may want to have is you provision using Docker Containers that immediately destroyed after and Jenkins has not created the user properly and it is unable to write to ~home/.ssh/known_hosts

I mention the typical errors where engineers go crazy and spend more time fixing.

RAB El nou món digital 2022-07-11 [CA|EN]

Aquest és el guió per al proper programa El nou món digital a Ràdio Amèrica Barcelona, a emetre Dilluns 11 de Juliol de 2022. 2022-07-11 14:30 Irish Time / 15:30 Zona horària Catalunya / 06:30 Pacific Time.

Disclaimer: Treballo per a Activision Blizzard. Totes les opinions són meves i no representen cap companyia.


This is the excerpt of my radio program at Radio America Barcelona on Monday 2022-07-11 14:30 Irish Time / 15:30 Catalonia Time / 06:30 Pacific Time.

Disclaimer: I work for Activision Blizzard. Opinions are my own. My opinions do not represent any company.

Aquesta és la pàgina del programa de ràdio emés l’11 de Juliol de 2022.

El nou món digital en Català

This is the page for the radio program streamed July 11th 2022. Soon I will upload the video in Catalan. Here is the version in English:

The New Digital World, New about Science, Technology, Entertainment and Video games in English.

Hi ha moltes novetats, i el temps de programa és limitat, així que he marcat en blau aquells articles dels que vull parlar.

Nous Gadgets

  • Pels fans de Mac, els nous Mac de 13″ amb els nous processadors M2 es començaran a servir el 15 de Juliol

Entreteniment i videojocs

  • Netflix ha penjat la primera pel·lícula original doblada al català. Es tracta de la producció d’animació ‘El monstre marí‘ i és també el primer film original infantil que una plataforma dobla al català.
    • La plataforma l’ha doblat del seu pressupost, sense rebre cap subvenció.
    • ‘El monstre marí’, a més, ha estat doblada a l’euskera i al gallec.
  • El 14 de Juliol s’entrena una sèrie de Resident Evil a Netflix. Zombies i monstres que no li agradarà a la Mariel.
  • He vist una sèrie nova de Netflix que m’ha agradat molt: God’s favorite idiot.
  • He vist disponible a Netflix Idiocracy, que encara que és antiga la recomano molt. És una pel·lícula d’humor que tracta sobre què passaria si la evolució fes a la espècie humana menys intel·ligent.
  • Està disponible al cinema: Thor Love and Thunder.
    • A una companya de feina li ha encantant.

I també disponible al cinema des de l’1 de Juliol:

  • Minions: The Rise of Gru

Descomptes/Promocions

Seguretat

  • La Mariel em comentava abans sobre la notícia de la vanguardia que diu que l’estat espanyol lidera les posicions (de víctimes) de robatori d’informació.
    • I per robatori d’informació vol dir número de tarja de crèdit, credencials per a accedir a la banca electrònica.
    • Cal matitzar que el 60% dels atacs provenen de Rússia.
    • I en molts casos, no ho diu la notícia però jo ho sé, de la Xina.
    • Bàsicament indrets on és molt difícil perseguir als delinqüients.
    • Sobretot ataquen per correu electrònic i SMS fingint ser missatges del banc
    • De nou us recordo els perills d’emprar software pirata, i us recomano que tingueu sempre la càmera del portàtil coberta amb una pestanyeta.
    • https://www.lavanguardia.com/tecnologia/20220711/8398995/espana-lidera-podio-mundial-ciberamenazas-robo-informacion.html

Programes anteriors

Programa anterior: RAB El nou món digital 2022-06-27 [CA]

Programa següent: RAB El nou món digital 2022-07-18 [CA|EN]

Tots els programes: RAB

RAB El nou món digital 2022-07-04 [CA|EN]

Aquest és el guió per al proper programa El nou món digital a Ràdio Amèrica Barcelona, a emetre Dilluns 4 de Juliol de 2022. 2022-07-04 14:30 Irish Time / 15:30 Zona horària Catalunya / 06:30 Pacific Time.

Disclaimer: Treballo per a Activision Blizzard. Totes les opinions són meves i no representen cap companyia.


This is the excerpt of my radio program at Radio America Barcelona on Monday 2022-07-04 14:30 Irish Time / 15:30 Catalonia Time / 06:30 Pacific Time.

Disclaimer: I work for Activision Blizzard. Opinions are my own. My opinions do not represent any company.

And the program in English:

Actualitat

  • Elon Musk ha fet fora 200 treballadors d’Autopilot i ha tancat les oficines de San Mateo. Ha transferit 350 treballadors a altres oficines.
    • La majoria de les posicions eren referent a l’etiquetatge de la informació rebuda dels clients.
    • A l’inici de Juny Musk va enviar un email als treballadors comentant que te un “super bad feeling” i que hi hauria acomiadaments. Sembla que vol acomiadar un 10% dels treballadors per a adelantar-se i reduir costs doncs sospita que hi haurà una recessió.
    • https://www.engadget.com/tesla-lays-off-200-autopilot-employees-221601186.html
  • La FCC americana ha otorgat a SpaceX llicència per a dotar del seu Internet per satelèl·lit a vehicles:
  • Uber ha publicat el seu segon informe bi-anual per als anys 2019 i 2020. I uber va rebre 3,824 reports de sexual assault o comportament inapropiat. 101 persones van morir degut a accidents mentre anaven en uber (la companyia diu que en la majoria dels casos els accidents van ser causats per tercers)
    • En el primer informe bianual, que va cobrir 2017 i 2018, el report de sexual assault van ser 5,981.
    • Tenint en compte que el 2020 estàvem en pandèmia no sembla que hagi millorat el tema.
    • Això em fa preguntar-me quins criteris de seguretat te en compte uber abans de permetre a un conductor d’unir-se a la seva xarxa.
    • https://www.engadget.com/uber-safety-report-2019-2020-114009657.html
  • I Cruise, l’empresa de robo-taxis de General Motors, (taxis sense conductor) que pot circular en alguns carrers d’Estats Units, al vespre ha protagonitzat una vaga no planificada quan la seva flota de cotxes es va aturar sense motiu, bloquejant el tràfic durant hores a molts carrers de San Francisco.
  • És 4 de Juliol i als Estats Units és festa. Aquest dia i aquesta setmana hi sol haver ofertes amb descomptes.
  • M’ha cridat l’atenció la notícia que diu que el príncep de Gal·les, que va acceptar un maletí amb un milió d’euros i dues donacions més d’un milió cadascuna, en total dos milions i mig de lliures d’un magnat àrab, diu que ho va donar a caritat i que no ho farà més.

Entreteniment i videojocs

Ciència

  • Una brain to AI interface ha permès a un home amb paràlisi alimentar-se sol

https://www.frontiersin.org/articles/10.3389/fnbot.2022.918001/full

Trucs

  • Usar una Dashcam pel cotxe/moto
    • Si hi ha un accident enregistra el que ha passat
    • N’hi ha que enregistren cap endavant i cap endarrera
    • Moltes companyies fan un preu d’assegurança més barat si tens una dashcam.

Programes anteriors

Programa anterior: RAB El nou món digital 2022-06-27 [CA]

Program següent: RAB El nou món digital 2022-07-11 [CA|EN]

Tots els programes: RAB

Install Jenkins on Docker with Blue Ocean and persisten Voluemes in Ubuntu 20.04 LTS in 4 minutes

Following the official documentation:

https://www.jenkins.io/doc/book/installing/docker/#setup-wizard

The steps are:

Create the network bridge named jenkins

docker network create jenkins

to execute Docker commands inside jenkins nodes we will use docker:dind

docker run \
  --name jenkins-docker \
  --rm \
  --detach \
  --privileged \
  --network jenkins \
  --network-alias docker \
  --env DOCKER_TLS_CERTDIR=/certs \
  --volume jenkins-docker-certs:/certs/client \
  --volume jenkins-data:/var/jenkins_home \
  --publish 2376:2376 \
  docker:dind \
  --storage-driver overlay2

Created a Dockerfile with these contents:

FROM jenkins/jenkins:2.346.1-jdk11
USER root
RUN apt-get update && apt-get install -y lsb-release
RUN curl -fsSLo /usr/share/keyrings/docker-archive-keyring.asc \
  https://download.docker.com/linux/debian/gpg
RUN echo "deb [arch=$(dpkg --print-architecture) \
  signed-by=/usr/share/keyrings/docker-archive-keyring.asc] \
  https://download.docker.com/linux/debian \
  $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list
RUN apt-get update && apt-get install -y docker-ce-cli
USER jenkins
RUN jenkins-plugin-cli --plugins "blueocean:1.25.5 docker-workflow:1.28"

Build it:

docker build -t myjenkins-blueocean:2.346.1-1 .

Run the Container:

docker run \
  --name jenkins-blueocean \
  --restart=on-failure \
  --detach \
  --network jenkins \
  --env DOCKER_HOST=tcp://docker:2376 \
  --env DOCKER_CERT_PATH=/certs/client \
  --env DOCKER_TLS_VERIFY=1 \
  --publish 8080:8080 \
  --publish 50000:50000 \
  --volume jenkins-data:/var/jenkins_home \
  --volume jenkins-docker-certs:/certs/client:ro \
  myjenkins-blueocean:2.346.1-1

See the Id of the running Containers:

docker ps

As in my case my jenkins container Id is 77b6a5a7ae8d in order to know the jenkins administrator password I check the logs for my jenkins Container with docker logs 77b6a5a7ae8d:

docker logs 77b6a5a7ae8d
Running from: /usr/share/jenkins/jenkins.war
webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
2022-06-26 21:02:05.492+0000 [id=1]	INFO	org.eclipse.jetty.util.log.Log#initialized: Logging initialized @549ms to org.eclipse.jetty.util.log.JavaUtilLog
2022-06-26 21:02:05.583+0000 [id=1]	INFO	winstone.Logger#logInternal: Beginning extraction from war file
2022-06-26 21:02:05.613+0000 [id=1]	WARNING	o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath
2022-06-26 21:02:05.674+0000 [id=1]	INFO	org.eclipse.jetty.server.Server#doStart: jetty-9.4.45.v20220203; built: 2022-02-03T09:14:34.105Z; git: 4a0c91c0be53805e3fcffdcdcc9587d5301863db; jvm 11.0.15+10
2022-06-26 21:02:05.986+0000 [id=1]	INFO	o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
2022-06-26 21:02:06.020+0000 [id=1]	INFO	o.e.j.s.s.DefaultSessionIdManager#doStart: DefaultSessionIdManager workerName=node0
2022-06-26 21:02:06.020+0000 [id=1]	INFO	o.e.j.s.s.DefaultSessionIdManager#doStart: No SessionScavenger set, using defaults
2022-06-26 21:02:06.021+0000 [id=1]	INFO	o.e.j.server.session.HouseKeeper#startScavenging: node0 Scavenging every 600000ms
2022-06-26 21:02:06.463+0000 [id=1]	INFO	hudson.WebAppMain#contextInitialized: Jenkins home directory: /var/jenkins_home found at: EnvVars.masterEnvVars.get("JENKINS_HOME")
2022-06-26 21:02:06.647+0000 [id=1]	INFO	o.e.j.s.handler.ContextHandler#doStart: Started w.@7cf7aee{Jenkins v2.346.1,/,file:///var/jenkins_home/war/,AVAILABLE}{/var/jenkins_home/war}
2022-06-26 21:02:06.668+0000 [id=1]	INFO	o.e.j.server.AbstractConnector#doStart: Started ServerConnector@4c402120{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2022-06-26 21:02:06.669+0000 [id=1]	INFO	org.eclipse.jetty.server.Server#doStart: Started @1727ms
2022-06-26 21:02:06.669+0000 [id=25]	INFO	winstone.Logger#logInternal: Winstone Servlet Engine running: controlPort=disabled
2022-06-26 21:02:06.925+0000 [id=32]	INFO	jenkins.InitReactorRunner$1#onAttained: Started initialization
2022-06-26 21:02:07.214+0000 [id=39]	INFO	jenkins.InitReactorRunner$1#onAttained: Listed all plugins
2022-06-26 21:02:10.781+0000 [id=47]	INFO	jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
2022-06-26 21:02:10.794+0000 [id=35]	INFO	jenkins.InitReactorRunner$1#onAttained: Started all plugins
2022-06-26 21:02:10.803+0000 [id=42]	INFO	jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/var/jenkins_home/war/WEB-INF/lib/groovy-all-2.4.21.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2022-06-26 21:02:11.634+0000 [id=30]	INFO	jenkins.InitReactorRunner$1#onAttained: System config loaded
2022-06-26 21:02:11.635+0000 [id=30]	INFO	jenkins.InitReactorRunner$1#onAttained: System config adapted
2022-06-26 21:02:11.642+0000 [id=48]	INFO	jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
2022-06-26 21:02:11.645+0000 [id=46]	INFO	jenkins.InitReactorRunner$1#onAttained: Configuration for all jobs updated
2022-06-26 21:02:11.668+0000 [id=67]	INFO	hudson.model.AsyncPeriodicWork#lambda$doRun$1: Started Download metadata
2022-06-26 21:02:11.675+0000 [id=67]	INFO	hudson.model.AsyncPeriodicWork#lambda$doRun$1: Finished Download metadata. 4 ms
2022-06-26 21:02:11.733+0000 [id=52]	INFO	jenkins.install.SetupWizard#init: 

*************************************************************
*************************************************************
*************************************************************

Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:

3de0910b83894b9294989552e6fa9773

This may also be found at: /var/jenkins_home/secrets/initialAdminPassword

*************************************************************
*************************************************************
*************************************************************

2022-06-26 21:02:22.901+0000 [id=52]	INFO	jenkins.InitReactorRunner$1#onAttained: Completed initialization
2022-06-26 21:02:23.013+0000 [id=24]	INFO	hudson.lifecycle.Lifecycle#onReady: Jenkins is fully up and running

In my case the password is at the bottom, between the stars: 3de0910b83894b9294989552e6fa9773

Go with your browser to: http://localhost:8080

How to deploy a DigitalOcean droplet (instance) and use userdata

You can see how to deploy a new droplet also named Instance or VM to DigitalOcean Cloud Provider in this video.

You can see how User Data works in this other video.

The userdata script is run as root the first time the instance is deployed.

I provisioned using this userdata script:

#!/bin/bash

sudo apt update && sudo apt install -y net-tools vim mc htop less strace zip gzip lynx curl wget git apache2

cd /opt/
git clone https://gitlab.com/carles.mateo/ctop.git

If you look for ctop.py check this page:

CTOP.py

For information about User Data from Digital Ocean:

https://docs.digitalocean.com/products/droplets/how-to/provide-user-data/

News from the Blog 2022-06-22

For the first part of June I’ve been quiet on Social Media as I was on holidays and taking some scheduled tests for my health in the hospital.

Carles in the Media/Press/Streaming

Twitch

I started streaming live Python coding sessions in Twitch. I’m giving it a try to see if coders have engagement.

The Software I use to broadcast from Linux is OBS.

I started with my Open Source project ctop.

I had a very long and interesting session on 2022-06-06 about OpenZFS, Data Centers, NVMe, iSCSI, Hard Drives, Storage, performance, Data Centers

More funny things happened like when I was installing a VirtualBox VM live, and the ZFS pool became irresponsible due hardware errors in one SATA Spinning drive.

Things from broadcasting live…

Some of the feedback I got from talented Engineers is that even if the original matter to talk about was interesting, seeing everything falling apart live due to unexpected hardware problems, and me troubleshooting live is being the best of the show… which I found very amusing.

RAB Radio the new digital world

I keep doing my radio space for Radio America Barcelona, once per week, addressed to the Catalan Community across the world and expats.

This radio program, streamed also via Twitch, is available in Catalan language only. RAB.

Open Source

carleslibs

I’ve been working in version 1.0.8 branch, and after a session of refactor on Twitch where I found a bug in MenuUtils class, I fixed it and released v. 1.0.8. You can see the video on the link.

Now I’m working on the branch v. 1.0.9.

ctop

I’ve been working in the branch 0.8.9.

My first Twitch broadcast was about adding Unit Testing to MemUtils class.

You can see all my videos:

http://www.youtube.com/channel/UCYzY-2wJ9W_ooR64-QzEdJg

Infrastructure

OpenStack

I recommend you the videos in this page about Operating OpenStack at Scale.

Some of my Blizzard colleagues talk on it.

https://www.openstack.org/videos/summits/denver-2019/how-blizzard-entertainment-uses-autoscaling-with-overwatch

My last physical server in a Data Center

This week I decommissioned my last physical server in a Data Center.

It has been a long journey since I created my company to launch my own projects, and I started having my own infrastructure, back at 2000.

I was offering VPS at that time, with VMWare as Hypervisor.

This last Rack Server served me well for 21 years.

Now everything is Cloud, and is not viable to host and maintain servers unless this is your main occupation. Server’s motherboards die, hard drives die and they need to be replaced. Maintaining infrastructure it’s a full time job and you require somebody to do it. Also using fixed servers only prevents you from moving fast, locks a lot of money, and from spawning more compute capacity.

If you are curious this Rack Server is a Super Micro with Intel Xeon processor and SCSI drives.

Security

Firewall

I keep blocking thousands of IP Addresses every day.

When I see a pattern of an IP trying an attacks against the Server I look at the IP and if it’s from a hosting provider I just block the entire range.

I keep blocking any IP Address coming from Russia or Belarus since they invaded Ukraine.

My Health

I visited the hospital for a programmed following on my health.

The analysis are super good, and it’s super clear that I’ve improved radically. My discipline with the diet, taking the medicines and doing exercise regularly has been crucial.

My Doctor is confident that I’ll have a full recovery, but to do so I need to loss a lot of weight in a year or two.

So, I need to focus on my health and in doing exercise, being happy and avoid any kind of negative stress.

The cost of the travels and the medicines have put some stress into my economy, but I’m fortunate that I can handle it.

Entertainment / Life / Reflections

Star Wars and racism

I’m really enjoying new Start Wars series Obi Wan, and I’ve been profoundly shocked to read that there are fans being racist against the black characters.

https://www.theverge.com/2022/5/31/23148468/star-wars-obi-wan-moses-ingram-third-sister

So just writing here to show my support to human beings from all races, genders including transgender, LGTB+, conditions and preferences.

Fixing the Error Can’t locate IPC/Run.pm in @INC in CentOS 7.5

So if you get an error like this:

Can't locate IPC/Run.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./check_ipmi_sensor line 35.
BEGIN failed--compilation aborted at ./check_ipmi_sensor line 35.

The solutions is simple.

sudo yum makecache

yum install perl-IPC-Run

You’ll see the list of mirrors and an output similar to this:

Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
centos-updates                                                                                                                                          | 3.4 kB  00:00:00
epel                                                                                                                                                    | 4.7 kB  00:00:00
extras                                                                                                                                                  | 3.4 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package perl-IPC-Run.noarch 0:0.92-2.el7 will be installed
--> Processing Dependency: perl(IO::Pty) >= 1.08 for package: perl-IPC-Run-0.92-2.el7.noarch
--> Running transaction check
---> Package perl-IO-Tty.x86_64 0:1.10-11.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================
 Package                                     Arch                                  Version                                    Repository                                  Size
===============================================================================================================================================================================
Installing:
 perl-IPC-Run                                noarch                                0.92-2.el7                                 centos-base                                122 k
Installing for dependencies:
 perl-IO-Tty                                 x86_64                                1.10-11.el7                                centos-base                                 42 k

Transaction Summary
===============================================================================================================================================================================
Install  1 Package (+1 Dependent package)

Total download size: 163 k
Installed size: 397 k
Downloading packages:
(1/2): perl-IO-Tty-1.10-11.el7.x86_64.rpm                                                                                                               |  42 kB  00:00:00
(2/2): perl-IPC-Run-0.92-2.el7.noarch.rpm                                                                                                               | 122 kB  00:00:11
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                           15 kB/s | 163 kB  00:00:11
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : perl-IO-Tty-1.10-11.el7.x86_64                                                                                                                              1/2
  Installing : perl-IPC-Run-0.92-2.el7.noarch                                                                                                                              2/2
  Verifying  : perl-IPC-Run-0.92-2.el7.noarch                                                                                                                              1/2
  Verifying  : perl-IO-Tty-1.10-11.el7.x86_64                                                                                                                              2/2

Installed:
  perl-IPC-Run.noarch 0:0.92-2.el7

Dependency Installed:
  perl-IO-Tty.x86_64 0:1.10-11.el7

Complete!