building colima’s user interface 4: creating new profiles
Quick update ! You are now able to create new colima profiles and configure the cpu, disk, memory, and framework
There is a bunch of features that can be added still. For example: information about docker, kubernetes support, more customization. That being said not sure if I am going to continue on with this project. Only time will tell
building colima’s user interface 3: start, stop, delete, list colima profiles
I wanted to share my progress on my colima user interface project. Since the last blog I have added the following:
List all colima profiles
Start profile
Stop Profile
Delete Profile
Next week I will be working on being able to create new profiles
building colima’s user interface 2: tools
For this project, I will be using Go to build the desktop application. I will be leveraging the Wails framework to create the desktop application and handle all the backend work. Another option was to use Fyne, but I would be limited to their GUI components. With Wails, I can have Go handle all the backend work and use React.js for the frontend. I am choosing not to build this application in Electron because I want to improve my Go proficiency, and Colima is also written in Go.
building colima’s user interface 1: overview
I recently lead the adoption of Colima at Gusto and one major pain points that I heard from engineers was that colima did not have a user interface. The colima-ui project will provide a user inerface for colima. I will be documenting my experience and decisions along the way.
Serverless. . . not actually serverless
I am currently in my journey through the Devops Roadmap and just learned about a Serverless application. It is a cloud provider managed infrastruture for a given application. This means that the app does indeed have a server but the cloud provider manages it. I thought this was mildly funny and thought was worth sharing
Reflection/Look forward - 2023
Career:
Doubling down on learnings. This year I have been using https://roadmap.sh/devops as a guide for my growth path.
I plan to develop a side project.
(optional) be more active on social
Personal:
Getting married
Getting back into the gym
Begin biking hobby
Eat healthier
Learn to make latte art
Why am I seeing docker: Error response from daemon: Please run 'docker login'. when I am logged in on Docker Desktop!
I recently faced this issue and I want to share my resolution and other ways to solve.
issue:
docker: Error response from daemon: Please run 'docker login'.
Why am I seeing this error? Well docker is having a hard time trying to identify you credentials. Here are few things to try
Run
docker login
This may be redundant but if you have not already ensure you are actually logged in
run
docker logout
thendocker login
sometimes the sessions have be invalidated by some factor.
remove your docker config
Your credentials are stored in docker config. so if you are mac run
rm ~/.docker/config.json
uninstall docker desktop
uninstall docker-cli
Proxy servers explained
A Proxy server is a web server that redirects web traffic. There are two types of Proxy servers: Forward Proxy Server and Reverse Proxy server. A forward proxy is a proxy server that sits infront of client machines. The forward proxy acts like a middle man for a client machine and a web servers. A reverse proxy sits in front of web server machines and reads/managed requests.
What is colima?
Overview
Colima is an open source tool that manages Linux Virtual Machines and container runtimes. What that means is that colima leverages another opensource tool Lima to create and manage Linux virtual machines and container runtimes like docker and containerd to run containers inside those VMs. Colima is written in Go and its codebase can be found here: https://github.com/abiosoft/colima
Features:
Support for intel and M1 Macs
Simple CLI interface
Support for docker and containerd (container runtimes)
Support for Volume Mounts
Kubernetes (being able to run tools like
minikube
andkind
)Support for running multiple instances (Virtual Machines)
About the author of colima
Abiola Ibrahim is the main author behind creator of colima. You can find him on linkedin at: https://www.linkedin.com/in/abiosoft/?originalSubdomain=ng. They currently work at Deimos as a fulltime Principal Software Engineer.
What makes Colima faster than Docker Desktop
There are 3 reasons why Colima performs faster than DockerDesktop:
Lightweight Architecture
Resource Efficient
Optimized for macOS
Lightweight Architecture
Colima’s lightweight architecture leverages native virtualization frameworks (HyperKit on macOs and QEMU on Linux) to result in a better result in some cases than Docker Desktop that may have additional layers.
Resource Efficient
Colima is resource efficient, which allows colima to do more with less. Where Docker Desktop has shown to use a higher amount of resources.
Optimized for macOS
Because Colima was built specifically with macOS, it is optimized for macOS by the features created by the open source community
what is apt?
There has many instances when I am pairing with a co-worker and we connect to a machine and run apt commands. Advanced Package Tool(APT) is a packaging tool that allows you install and remove software to Debian and Debian-based Linux distributions (ex. Ubuntu)
what is a linux distro?
A linux distro refers to Linux distribution Software. Linux distribution is an operating system that includes a linux kernel and often includes a package management system. An example of a Linux distro is Ubuntu.
Experiment: Orbstack virtual machine
This short blog post will be used to document my tinkering with orbstack’s virtual machine technology.
Creating Virtual Machine
I start off by creating a VM. I will be using ubuntu for this experiement
orb create ubuntu
orb
Install software
For this experiment I will be setting up a ruby developer environment. I will leverage apt to install software into the virtual machine. I will be following https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-20-04 on how to install ruby on ubuntu with rbenv
sudo apt update
sudo apt install git curl libssl-dev libreadline-dev zlib1g-dev autoconf bison build-essential libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
rbenv install 3.2.2
Orbstack: A Docker Desktop replacement
I am trying a few alternatives to docker desktop. The main reason for trying out is to learn more about containerization. Orbstack’s key features are:
free for personal use (paid for enterprise)
allows you create and interact into virtual machine with their cli tool
fast
brew suppport
What is a DDOS Attack and how to mitigate one
What is a DDOS Attack?
A Distributed Denial-of-Service(DDOS) Attack is when a bad character maliciously sends a large number of requests to a website. When a website receives a large amount of requests in a short period it can cause the website to break due to lack of resources needed to support the large amount requests. A DDOS Attack can also be expensive for the owners of the website if the resources used for the website are increased.
What to do when you are a target in a DDOS Attack?
There are multiple strategies that can be used to mitigate a DDOS Attack. These stategies can be conbined to quickly mitigate the attack
BlackHole Routing
Create a Null route that receive all traffic and loses it. This approach is a last straw approach where the owners of the website have no means to block the attack. This is not the ideal approach as it gives the attacker what they want.
Rate Limiting
Setting a limit to the amount of request a website is able to receive. This approach will not solve a DDOS Attack but it will slow down web scrapers from stealing content and mitigate brute force login attempts.
Web Application Frirewall (WAF)
A WAF is a tool that can act like a reverse proxy and be able to filter requests. You can quickly implement custom rules in response to an attack that will be able to mitigate a DDOS Attack.
Anycast network diffusion
By leveraging a Anycast network, you can scatter the attack traffic across the network of distributed servers to which the attack traffic is manageable.
Things to keep in mind
Ensure the right stakeholders are aware of the attack:
Users
Company partners
Employees
In order to mitigate a DDOS attack it is important to gather information about the request:
Which countries are these requests coming from
Are the bad actor requests are spread out sparsely or in a single area
leaving obsidian to notion
I have been using notes to keep track off my work notes, blog posts, interesting finds, etc. Originally I downloaded Obsidian for its node view. I thought it was a very cool feature to see how you notes are connected but after a 1 year of using obsidian, I am moving over to use Notion for my notes.
One of the biggest reason for switching is syncing. Obsidian offers a paid syncing services but I dont see the value of paying 8 dollars a month for that. I have been manually syncing my notes by leveraging git to create a git repository and host in github. This has been very tedious and frankly not worth it. I will be documenting my experience using Notion and follow up with a post deciding if I am going to continue to use Notion.
what does the Docker Engine even do?
The Docker Engine as a clients-server applications. It is made up of three components:
dockerd
- Dockerd is a server with a long running daemon process that is used to manage containers
docker engine APIs
- This api provides a way to interact with the Docker daemon. The docker engine API specifies the interfaces that programs can use to talk to and instruct the Dockker daemon
docker cli
- Command Like Interface(CLI) that leverages the docker engine's APIs to interact with the the daemon(dockerd)
why do I need docker desktop to run docker?
Docker as a technology can only be ran on a Linux Operating System(OS). Docker Desktop creates a Virtual Machine(VM) on you host OS and forwards commands from the docker cli to the linux VM. In addition it provides a Graphical User Interface for visualizing you container contents. There are multiple components that are included in Docker Desktop:
Docker Engine
Docker cli client
Docker Scout
Docker Buildx
Docker Extensions
Docker compose
Docker Content Trust
Kubernetes
Credential Helper
what is virtualization?
Virtualization is a technology that you can use to create virtual representation of servers, storage, networks, and other physical machines. Virtualization mimics the functionality of of physical hardware that allows users to run multiple virtual machine on a single physical machine. Two concepts that are important in virtualization are virtual machines and hypervisor. A Virtual machine is a software defined computer that runs on a physical computer and the hypervisor is a software component that is use to manage the virtual machines.