Running Nanos Unikernels on ESX | DevsDay.ru

IT-блоги Running Nanos Unikernels on ESX

DZone DevOps 15 сентября 2020 г. Ian Eyberg


Did you know you can run unikernels on ESXi? If you've worked with unikernels before you're probably aware of this but during these past few months we got Nanos unikernels running there. We've had Xen support for over a year now because the older AWS instances utilized that and we've had KVM support since day one because that's our main go-to hypervisor.

We already run certain workloads like go and rust webservers 2x as fast on Google Cloud and since many companies still have very large on-premise installations we wanted to add VMWare VSphere support.

This set of examples below should work on both vSphere 6.7 and 7.0. We haven't tested out other versions yet but if you do let us know! It also works in a nested virtualization situation such as running vSphere under Fusion. That's a great way to test things out without having to take over an entire box - it works well on my ~5-year-old mac.

First things first - go install OPS. If this is your first encounter with unikernels or OPS you probably will want to check out this tutorial first.

Create an Image

The first thing you'll want to do is create an image. The image is exactly what it sounds like - a disk image except this one isn't running Linux. It is simply running only your application - so instead of starting a bunch of services and going to your init manager, it goes straight to your program instead.

You'll want to set the GOVC environment variables which will at least include the username, password, and URL but could also include the datacenter. Also, at this time we haven't included TLS support for the client yet but that should be trivial to add for those who are interested - let us know if so. The underlying library being used has a rather extensive SOAP-based API so most of these commands are very comparable to their govc CLI counterparts:

Shell
 




x


1
export GOVC_INSECURE=1
2
export GOVC_URL="login:pass@host:port"
3
 
          
4
GOOS=linux go build -o gtest
5
 
          
6
ops image create -c config.json -t vsphere -a gtest



This will convert your image to a monolithic flat vmdk which is composed of two parts. We then upload it and create a copy of it to use it.

Create an Instance

After you create a disk image we'll create an instance, so you'll need to set the resource pool. If you don't know what it is you can find it on the main host screen:

localhost

Shell
 




xxxxxxxxxx
1


1
export GOVC_INSECURE=1
2
export GOVC_URL="login:pass@host:port"
3
export GOVC_RESOURCE_POOL="/ha-datacenter/host/localhost.localdomain/Resources"
4
 
          
5
ops instance create -t vsphere -i gtest



Also, when passing in the login and password through the GOVC_URL env var ensure that they are URL-encoded if they have special non-URL safe characters.

Grab a List of Instances

Shell
 




xxxxxxxxxx
1


 
1
export GOVC_INSECURE=1
2
export GOVC_URL="login:pass@host:port"
3
 
          
4
ops instance list -t vsphere



This next command allows you to see the list of unikernels you've deployed. The first time you run this command OPS will try and set the "Guest IP Hack". This hack essentially allows for arp translation to happen so we know what IP your instance is listening on. There are other ways of achieving this but we found this to be rather straight-forward.

Yanking Out Logs

The logs are piped from a serial adapter out to a log file and you can obtain them like so:

Shell
 




xxxxxxxxxx
1


1
export GOVC_INSECURE=1
2
export GOVC_URL="login:pass@host:port"
3
 
          
4
ops instance logs -t vsphere gtest



This by default will yank the last 100 lines of output. For a real production install you'd probably ship these out over Syslog to something like paper trail or some other logging solution.

Use Cases

One of the more interesting things we've found with deploying unikernels to vSphere is that a lot of companies with existing deployments have so-called "brown field" software. This typically involves lots of legacy software that a company might not have written themselves but still have to support. You know ad-hoc products that were written on tomcat or bind a decade ago - that sort of thing. Activities such as patching every single time a new vulnerability comes out or re-provisioning a server with the same sort of setup that it had before disaster strikes are common routines.

Modern-day configuration management software such as terraform or chef/puppet aren't as heavily used in these environments so the ability to re-deploy a service instantly and not have to screw with provisioning an entire system each time is a huge relief to some sysadmins, as is the knowledge that the only thing that is getting provisioned is the program in question and not a billion other programs that you may or may not want or trust.

If you are a vSphere power user let us know what you think and what should be improved and if you are a developer we take pull requests!

Источник: DZone DevOps

devops vsphere unikernel

Читайте также


Securing Your Cloud-Native Journey

DevOps DZone DevOps 24 сентября 2020 г. 5:37
If you have embraced the concept of cloud-native computing and principles, you are ahead; you are on the right path in today’s advanced and competitive IT environment. But we need to understand one thing that, moving your development environment and...... читать далее
devops cloud native

Mirroring Git Changes From One Server to Another Server

DevOps DZone DevOps 23 сентября 2020 г. 22:02
Introduction Hello all, nowadays most of the development teams using GIT version control, some of you may have a requirement of mirroring your team's git changes from one server to another Git server. This article will help you to achieve the Git mir...... читать далее
devops git git and github git best practices git cloning git server

DevOps DZone DevOps 23 сентября 2020 г. 21:52

For the last decade or so, great advancement has been made in regards to Continuous Integration (CI) and Continuous Delivery (CD). The rise of DevOps testing has led to rapid demand for CI/CD tools. Existing solutions are consistently perking up with...... читать далее

devops ci/cd jenkins ci selenium automation gitlab ci ci cd tools

DevOps DZone DevOps 23 сентября 2020 г. 15:26

On-call: you may see it as a necessary evil. When fast incident response can make or break your reputation, designating people across the team to be ready to react at all hours of the day is a necessity.  But, this often creates immense stress w...... читать далее

devops monitoring site reliability engineering site reliability site reliability engineer monitoring and alerting paging site reliability engineering tools on-call alerting and notifications

DevOps rtfm.co.ua 23 сентября 2020 г. 14:22

 Задача — запустить Redis в Kubernetes. Используем Master-Slave репликацию и Sentinel для мониторинга и failover. См. Redis: репликация, часть 2 — Master-Slave репликация, и Redis Sentinel. Redis cluster vs Redis replication См. Redis: реп...... читать далее

Databases HOWTO's Kubernetes Redis Virtualization databases

Разработка dou.ua 23 сентября 2020 г. 13:00

«Я знаю, что ничего не знаю» © Сократ Для кого: для IT-шников, которые плевали на всех разработчиков и хотят поиграть в свои игры! О чем: о том, как начать писать игры на C/C++, если вдруг вам это надо! Зачем вам это читать: разработка приложений...... читать далее

DevOps rtfm.co.ua 23 сентября 2020 г. 8:58

 Имеется Slack desktop на Arch Linux. Устанавливался из AUR, работал обычно без проблем. Но в какой-то момент перестал запускаться, ругается на 'appTeams' property: Версия: Даунгрейд на 4.8.0 не помог. Решение — снести весь каталог ~/.conf...... читать далее

Arch Linux UNIX/Linux Проблемы и решения Разное Linux Slack

Популярные темы

ux (288) design (245) новости (240) новость (175) web dev (158) devops (151) ux-design (149) security (144) ubuntu (142) javascript (141) headline (114) tutorial (106) python (106) ui (98) статьи (93) user-experience (84) api5 (76) seo (76) testing roundup (73) java (71) игровые проекты (70) дизайн (69) software testing (68) programming (68) primary (63) product-design (62) design-thinking (61) ui-design (57) windows 10 (54) laravel (54) uncategorized (52) прочее (51) google (51) español (49) working in tech (47) турбо-страницы (47) работа (44) навыки алисы (43) обучение (43) web design and applications (42) бизнес (42) technology (42) движки и конструкторы игр (40) дайджесты вакансий от new.hr (40) covid-19 (40) case-study (40) publication (39) wp (38) мероприятия (38) технологии (37) тестирование (36) vue.js (36) aspnet (36) полезное (36) css (36) hardware (36) debian (35) networking (35) kali linux (35) docker (35) machine learning (35) инструкции (34) home page stories (34) навыки (33) powershell (33) google ads (33) web (33) angular (32) android (32) windows (31) wordpress (31) art (31) ux-research (31) алиса (31) .net (31) linux mint (30) inspiration (30) интервью с экспертами (30) apple (29) creativity (29) data (29) без рубрики (28) c# (28) dotnet (28) cloud (28) api4live (27) api (27) tutorials (27) chrome (27) user-research (27) ios (27) web-design (26) job hunting (26) события (26) linux (26) автоматизация (26) kubernetes (25) vmware (25) школа алисы (25) tools (25)