How setup a Gitlab Runner (CI)

Part I - I’m learning Gitlab Runner and how them works on CI implementation. GitLab Runner is an application that works with GitLab CI to run jobs in a pipeline, they are written in GO Summary the task I will do: Install Gitlab-runner as container(podman). Runner registration. Enter the GitLab instance URL registration token. runner description. tags. Select an executor. Create a gitlab-ci.yml Install runner: Create the Volume: podman volume create gitlab-runner-config Pull and start the container by register command, then we will prompt the data need for register the runner into the project. ...

2021-12-08 Â· map[name:Jose Castrillo]

Format & Mount an usb drive in GNU/Linux [terminal]

Format and Mount usb drive in GNU/Linux Tools/commands: lsblk parted df fdisk mkfs wipefs check if which blcok devices used by usb (sd) [df -h, lsblk] eg: a) $ sudo fdisk -l Disk /dev/sda: 7.2 GiB, 7736072192 bytes, 15109516 sectors Disk model: DataTraveler 3.0 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x00000000 b) ...

2021-01-22 Â· map[name:Jose Castrillo]

Serial communication Arduino

From my last post (Arduino-oled-display) I added a new function that allows me to send notification/messages from my terminal (linux) to my Arduino and it shows it through the little Oled screen. Here I will share the commands and code lines to get done the serial communication on your project. void loop() { while (Serial.available() > 0) { char recieved = Serial.read(); inData += recieved; // Process message when new line character is received if (recieved == '\n') { Serial.print("Arduino Received: "); Serial.print(inData); //digitalWrite(ledPin, HIGH); // if(inData == "HELLO\n") { // DON'T forget to add "\n" at the end of the string. Serial.println("HELLO"); //digitalWrite(ledPin, LOW); display.clearDisplay(); display.setCursor(0,0); display.setTextSize(2); display.print("Hi jose!"); display.display(); delay(3000); } inData = ""; // Clear received buffer } } }

Nextcloud bot as Notification System

Following the last post, where I shared how to use Telegram’s bot; on this post I’m going to explain how implement it by Chat Nextcloud API. This post is useful for those have a Nexctcloud deployment running at home/cloud. Assuming you have already Nextcloud up and running, we can create the new user, that we are gonna use it as “BOT” we will need the chat room token and the “BOT” credentials. ...

Telegram Bot as Notification System

From one older post “Create a job using crontab” I used into my script the service exim4/ssmtp as mail server using gmail, but as we’re trying to walk away of Google’s jaw, I switched my notification engine to Telegram by an API service(bot)… almost it’s a step forward ! :) Requirement: Bot (Telegram) Web Browser Terminal(script) I will assume you have already set up your Bot on Telegram with BotFather When you have already created your Bot you can check by the API through a web browser ...

Docker Container "before start"

Part I Containers are environments that host individual applications using a framework like Docker. Docker Editions: Docker CE ( community edition ) free version Docker EE ( enterprise edition) Paid Versions: Stable, released every 4 months. Edge (beta) released every month. For testing EE, support for one year. Example how to create a container: $docker container run --publish 80:80 --detach --name webhost nginx detach: subcommand is to let run the container and keep use the command prompt name: create a container’s name. ...

2020-01-26 Â· map[name:Jose Castrillo]

How to set you SSH key into Gitlab

How to set you SSH key into Gitlab [First you need to had installed Git onto your distro] Go to your terminal and issue the follow command to generate your key: $ssh-keygen Copy your public key from the route: /home/user/.ssh/id_rsa.pub Then go at your gitlab profile https://gitlab.com/profile/keys/ a paste and save. From the terminal test the conection by typing: $ssh -T git@gitlab.com and if everything was fine it has to promt –> Welcome to GitLab, @user_account! ...

2019-12-26 Â· map[name:Jose Castrillo]

Create a .zip using 7z by cmd in Windows

After to install the 7z in our windows workstation/server then we need to create our evironment variables to call the function from the cmd [1]. Then the command below will guide you to zip a simple file: 7z a -r [myzip] [example.txt] [myzip] - the zip name file [example.txt] file used for the example To zip a folder 7z a [myzip] [folder] Docu based thx to the information seen from: [1] GlobalEnviroment

2019-06-11 Â· map[name:Jose Castrillo]

Output IPCONFIG report to HTML by PowerShell

$file = "C:\Users\jcr\a.html" $ipconfig=ipconfig /all |%{"$_<br/>"} $body=@" <html> <head> <title>Network Report</title> </head> <body> <h1>IPConfig /All</h1> <pre>$ipconfig</pre> </body> </html> "@ $body | Out-File $file . $file

2019-04-25 Â· map[name:Jose Castrillo]

Create a job using crontab

To automate tasks or create some monitoring job we can use the older and efficient tool the “CronJob”. For our example, I’ve created a simple script to detect the cache memory and clean it if raise to a condition then send a notification by mail. Library used: exim4 (mail server) or ssmtp (mail server). Both uses the same “mail” command. Script: # grab the buff/cache memory mem="$(free -m | grep 'Mem:' | awk '{print $6}')" if (( $mem > 350 )) then echo 'wooo is more than 250M' echo 3 | sudo tee /proc/sys/vm/drop_caches echo 'cache dropped' echo "Memory buff/cache cleaned last value:" $mem | mail -s "cache_memory" target_mail@local.com else echo 'be cool man, memory lower' fi script path: /user/Documents/script/memory ...

2019-04-03 Â· map[name:Jose Castrillo]