Unikraft-Exploring Unikernel

Important Terms

  • Benchmarks

In computer science, a benchmark refers to the act of running a computer program, a set of programs, or other operations to assess the relative performance of an object, such as hardware or software. . Benchmarks are used to compare the performance of different subsystems across various chip/system architectures

  • Overhead

Overhead in cloud computing refers to any combination of excess or indirect computation time, memory, bandwidth, or other resources that are required to perform a specific task within a cloud computing environment1 . It is a measure of the additional resources consumed beyond what is strictly necessary to complete a task or process.

  • UserSpace Kernel Monitoring

Userspace kernel monitoring refers to the process of monitoring the interaction between the kernel and user-space processes. This can be done using various tools and techniques, including kernel modules, system calls, and userspace tools. Some of the ways to monitor userspace kernel interactions are: Kernel modules: Kernel modules are pieces of code that can be loaded into the kernel to extend its functionality. They can be used to monitor process creation, resource usage, and other kernel events . System calls: System calls are the interface between user-space processes and the kernel. By monitoring system calls, it is possible to track the resources used by a process and detect any abnormal behavior Userspace tools: Userspace tools are programs that run in user-space and interact with the kernel through system calls. They can be used to monitor system health, including temperatures, voltages, and fan speed Overall, userspace kernel monitoring is an important technique for maintaining system health and detecting any issues that may arise. It can be used to monitor resource usage, detect abnormal behavior, and ensure that the system is running smoothly.

  • POSIX

POSIX stands for Portable Operating System Interface, which is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems1 . POSIX defines both the system and user-level application programming interfaces (APIs), along with command line shells and utility interfaces, for software compatibility (portability) with variants of Unix and other operating systems

  • NanoVMs

NanoVMs is a company that specializes in creating a production-ready unikernel platform1 . A unikernel is a small, secure, and lightweight virtual machine that is designed to run a single application . NanoVMs aims to provide a cloud infrastructure platform that is optimized for today’s generation of cloud infrastructure . Their platform offers both public and private environments for running applications

Resources to explore

Let’s dive deep

Three types of libraries:

  1. Core: internal kernel -> Unikraft source code

  2. External libraries: Libraries dependencies for your apps. For example: for running Nginx, Redis → They need threading, we can use the remote library for threading, and similarly, we need a library for networking -> TCP/IP stuff.

  3. Platform: For monitoring, and for providing runtime for the apps. For the architecture → Target the specific architecture whether it is intel x86, ARM/

All these components are put together to form a unikernel.

What is Unikernel?

A single, specialized kernel in which all the above components are bundled together. We get an image that can run target apps.

To get started

Krafkit: package manager

Step 1: The installation process for Kraftkit-

Performance issues with Linux-> solved by Unikernel?

My Insights On Securing LiFT Scholarship’ 2023

     “It’s our mission to spread the collaborative DNA of Linux to other industries and projects.” – Jim Zemlin, Linux Foundation executive director.

I am thrilled to share the exciting news that I have been selected for the LiFT scholarship under the Woman in Open Source category. Out of thousands of applications, mine was chosen. This is a momentous occasion, and I have eagerly awaited the day when I would receive my first scholarship from the prestigious Linux Foundation. It marks the beginning of an incredible journey for me, as I have already immersed myself in the world of open source and have no intention of turning back.

Each day brings new opportunities to learn and make meaningful contributions to society through technology. Drawing from my personal experience, I have encountered numerous challenges in finding the right organization for me, and this quest began even before I entered college. The prospect of contributing to real-world projects fills me with excitement, and it is this enthusiasm that fuels my desire to continue my journey of open source involvement within the tech industry.

While there are many remarkable tech giants out there, Red Hat has always captivated my imagination more than any other. It is not merely about the salary, but the philosophy behind the organization that truly matters to me. The work environment and the community surrounding a company hold greater significance in the tech realm. Together, we can address crucial global issues such as sustainability, accessibility, and green computation.

This is why I have chosen the Linux Foundation as my preferred platform. By connecting with the Linux Foundation, I hope to gain deeper insights into the community that revolves around Linux—a software that I am incredibly passionate about, as you may already know if you have read my previous blogs.

Receiving the LiFT scholarship from the Linux Foundation is a significant milestone for me. Not only does this scholarship recognize my potential and passion for open source, but it also provides additional benefits. As a recipient of this scholarship, I am entitled to one Linux Foundation eLearning training course, as well as one certification exam registration, both at zero cost. This opportunity to enhance my knowledge and skills in the field is invaluable, and I am incredibly grateful for this support.

In conclusion, this scholarship opens doors for me to embark on a journey of exploration, collaboration, and making a positive impact through open source technology. By being a part of the Linux Foundation, I not only hope to enhance my understanding of the Linux community but also contribute meaningfully to the field. This scholarship is just the beginning, and I am eager to seize every opportunity that comes my way.

P.S : I will be sharing my Linux Foundation training course learnings in my future blogs ;)

Unfolding The Power Of Conferences And MeetUps

Attending Conferences: A Life-Changing Experience

Trust me when I say that attending conferences can truly be a life-changing experience.

I have witnessed students participating in remarkable open-source conferences like FOSSASIA, KDE Akademy, OpenSUSE Conferences, Red Hat conferences, Fedora conferences, and Kubecon (CNCF conferences).

While I have attended some of these virtually and even received scholarships to attend in person, unfortunately, financial constraints prevented me from participating offline.

Being involved in the open-source community, even as a consumer, is a form of contribution itself. By engaging with these communities, we gain a deeper understanding of their philosophies and have the opportunity to actively listen to their insights. Contribution to open source can take various forms, extending beyond just writing code. It can involve documentation, bug reporting, user feedback, and much more.

The key is to actively engage with the community and contribute in ways that align with our skills and interests.

Doon Tech Community(DTC)

Allow me to share the story of my first local in-person tech meet, which held immense significance for me. Coming from a non-techy tier-3 city where tech conferences were a rarity, attending this event was a monumental milestone.

I thoroughly enjoy sharing my tech interests within the community and find great value in learning publicly by actively contributing to open source. While learning in a sandbox environment has its benefits, collaborating with people who are already doing what you aspire to do accelerates your growth significantly. By learning from their experiences and diving into practical experimentation, you gain a more profound understanding of the technology itself.

In my experience, meeting new people and engaging in discussions allows you to expand your network and potentially collaborate with them in formal settings. This not only enhances your personal brand but also equips you with valuable skills in communication and critical problem-solving that may not be encountered within the confines of a traditional 9-to-5 college experience. One of the highlights of attending conferences is the opportunity to network with interesting individuals passionate about technology. I found the speakers to be incredibly humble and supportive, guiding me at every step. It was an absolute pleasure to connect with them in person, exchanging ideas and building meaningful connections.

I eagerly look forward to attending more Doon Technical Meetups in the future, as they have been an incredible source of inspiration and growth for me. The camaraderie and shared enthusiasm among attendees make each event an enriching experience.

DTC Meetup Ground Photo

In conclusion, conferences have the potential to shape our lives in profound ways. They provide a platform for learning, networking, and personal growth. By attending conferences and actively engaging with the tech community, we not only expand our knowledge and skills but also foster valuable connections that can propel us toward success.

Here’s to embracing the power of conferences and the opportunities they present.

DTC rocks!

;)

Termux: Linux Emulator

Termux: Running Linux On Android

Hehheh, when I was a kid I didn’t know penguins will be so cute and cool to be friends with.

Termux is an emulator that runs a Linux environment on Android, you can install this application on your Android phones to access the CLI(Command line interface). You can write commands on it to access the file/directories of your computer system. Normally, computers uses Graphical user interface like Windows, which donot requires you to learn commands to operate your computer machine.

On Linux, you can operate your computer without depending on the mouse, it only requires you to have terminal and keyboard access.

The fun part is during this process you learn more about your operating system and the modules that build it up.

Android also uses the modified version of the Linux kernel so you can use Termux on Android easily.

Experimenting With Termux

Termux Emulator

Step 1: Upgrading the Termux packages: apt-get install

upgrade

Step 2: Now, if you want to install new packages:pkg install git

install packages

BUG founded!!!!

Finally, I found a Linux bug after a long time, let us see how this nasty kid can be fixed.

Unable to find the package git.

Debugger mind exploding!!!!

Seems like the mirrors can’t find the package git! Hmm or maybe the name of the package got changed? Oh if it did then the Termux latest version should have it so am I using the outdated version of Termux. Probably yes!

How to fix it??

  • First, try googling.
  • Then maybe by changing mirrors we can try running the command again.

Solution

apt update: Running this will update all the Termux packages that we previously didn’t update. Now retry running that command again.

bug resolved

Woah! It runs.

Moreover, after googling I found out that Termux on PlayStore is not updated so it will throw bugs in future. To use the latest Termux either one will have to download it from FDroid or GitHub.

Installing SSH

Want to do a git clone on your Android without relying on GUI? so install ssh so that you can git clone using ssh()secure shell). First, run apt update && apt upgrade.

updating

Second, pkg install openssh: It will install ssh on termux.

install ssh on termux

Setting Up Git On Termux

Update and upgrade all the packages of Termux: apt update && apt upgrade.

install ssh on termux

Install git and openshh: apt install git openssh

install ssh on termux

Setting the Git Storage

termux-setup-storage: Setting the storage for termux, it will ask you to access the storage of your mobile phone, allow to continue.

Connect to GitHub

We need to create the key-pair of SSH using the command: ssh-keygen -t rsa -C "YOUR_EMAIL_ADDRESS"

ssh

Generating a new ssh key

Follow this: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

Adding new ssh key to your GitHub account

Follow this: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account

Log in to GitHub

ssh -T git@github.com

ssh

Finally, you have setup git on your termux, now you can upload files on github using your git account.

Cloning git files

You can run git commands git clone https://......

then clicking on ls will show you the downloaded files.

git files

Running .py scripts

Installing python:pkg install python

But then got another error that says:

    pkg install python
    Checking availability of current mirror: bad               Testing the available mirrors:
    [*] https://dl.bintray.com/termux/termux-packages-24: bad
    [*] https://grimler.se/termux-packages-24: bad
    [] https://main.termux-mirror.ml: bad                     [] https://termux.mentality.rip/termux-packages-24: bad
    Using fallback mirror: https://termux.org/packages         Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package python

Solution

Refer this: https://trendoceans.com/termux-package-management-issue/ Tried both solutions but still the errors persist.

.py script

Hence, the ultimate solution to this will be to switch to github repo or a fdroid repo that consist of latest termux.

If the errors got resolved for you then-

You can try running python script. Running python scripts: python3 filename.py.

Note- You cannot do high end task but you can run scripts and commands of linux on android.

Conclusion

Run linux commands on Android and learn android hacking if you like playing with the systems. To know more about termux and android hacking, visit: x.x.x.x blog(my upcoming blog).