Open source alternative to AWS. Elastic compute, block storage (non replicated), firewall and load balancer, managed Postgres, K8s, AI inference, and IAM services.
Find a file
Eren Başak 0b8d249c23 Add Disk IO to VM Host Healthchecks
The health checks in `VmHost#check_pulse` and `HostNexus#available?`
were simple SSH access attempts, but this was not sufficient for
detecting issues in the disks. This change adds a simple disk IO
to the health check commands.

The disk I/O added for the health check is a simple read from
/dev/zero into a random file in /tmp. This would be enough to detect
any obvious failures related to the disks. Note that, in cases of
multiple disks are mounted into the file system (`/`) via raid, this
approach may not detect a single disk failure as long as the system
works.

Note: Through the codebase, health checks for the monitor (`check_pulse`)
and progs (`available?`) are duplicated, which is also the case for
VM host. We can argue about unifying the health check and availability
detection in general as a next step. Still, I wanted to make some
deduplication by extracting the shell command to be used for health
check into a `VmHost` constant.

Future work: While some disk i/o would be enough to check for obvious problems,
as a future work we can consider monitoring SMART bits, preferably
with less frequency and less severity.
2024-10-29 11:05:28 +03:00
.github Upload coverage report with different artifact names in CI 2024-10-28 22:07:14 -07:00
assets Fix available storage bug on vm creation page 2024-10-17 11:48:45 +03:00
bin Improve awesome_print output for Sequel::Model instances 2024-10-28 19:25:44 -07:00
cache Use Sequel schema_caching and index_caching extensions 2024-10-28 16:31:46 -07:00
config Create 'hetzner-ai' location 2024-10-28 09:16:25 +01:00
demo Generating location and provider options from a config file 2024-04-24 01:46:35 -07:00
lib Remove almalinux-8 2024-10-28 11:19:10 -07:00
migrate Add migration file for Postgres version 2024-10-25 13:44:27 +03:00
model Add Disk IO to VM Host Healthchecks 2024-10-29 11:05:28 +03:00
prog Add Disk IO to VM Host Healthchecks 2024-10-29 11:05:28 +03:00
public Add lantern to Postgres database list UI 2024-10-10 21:49:50 +02:00
rhizome Update address for blob storage cache 2024-10-28 21:52:34 +03:00
routes Rename current_user to current_account 2024-10-28 16:32:03 -07:00
scheduling Allow attaching readonly disks to VMs 2024-10-01 15:36:57 +02:00
serializers Show Postgres version in the UI 2024-10-25 13:44:27 +03:00
spec Add Disk IO to VM Host Healthchecks 2024-10-29 11:05:28 +03:00
views Rename current_user to current_account 2024-10-28 16:32:03 -07:00
.by-session-setup.rb Add rake by for faster testing of single file or spec 2024-10-24 06:01:19 -07:00
.dockerignore Add cloudify_server script for demo quick start 2023-08-01 10:10:22 +03:00
.editorconfig Add EditorConfig 2023-04-10 19:49:54 -07:00
.envrc Add standardrb, rspec, remove some of minitest 2023-01-17 12:13:22 -08:00
.gitignore Automatically use parallel testing in Rakefile 2024-10-28 16:32:18 -07:00
.rspec rspec --init 2023-01-17 12:16:56 -08:00
.rubocop.yml Update rubocop and apply fixes 2024-10-28 22:01:50 -07:00
.spectral.yaml Add OpenAPI specification and linting/formatting tool 2024-09-04 06:21:37 -07:00
.tool-versions Bump the nodejs to 22.9 from 22.5 for tooling 2024-09-26 15:45:46 +03:00
clover.rb Support testing with frozen Database and models 2024-10-28 14:31:00 -07:00
clover_api.rb Add CloverBase#current_user 2024-10-28 14:40:13 -07:00
clover_runtime.rb Add check_separate_requires rake task 2024-10-24 07:55:06 -07:00
clover_web.rb Fix suspend bypass via remember token 2024-10-28 22:25:43 -07:00
config.rb Download cache proxy source code and run it from source 2024-10-28 21:52:10 +03:00
config.ru Backport Tilt finalization from roda-sequel stack 2024-02-19 15:56:13 -08:00
db.rb Use Sequel schema_caching and index_caching extensions 2024-10-28 16:31:46 -07:00
DEVELOPERS.md Make small touches to DEVELOPERS.md 2024-10-29 08:29:27 +02:00
Dockerfile Bump node in the docker-dependencies group across 1 directory 2024-09-26 15:45:46 +03:00
Gemfile Add ap to print object prettier in pry 2024-10-27 21:00:50 +02:00
Gemfile.lock Bump the development-dependencies group across 1 directory with 5 updates 2024-10-28 22:14:46 -07:00
LICENSE Update LICENSE 2024-01-29 18:02:07 -08:00
loader.rb Remove duplicate CLOVER_FREEZE_CORE check in clover_freeze 2024-10-28 14:31:00 -07:00
model.rb Include quotes around ubid in Model#to_s 2024-10-28 19:25:44 -07:00
openapi.yml Add OpenAPI specification and linting/formatting tool 2024-09-04 06:21:37 -07:00
package-lock.json Bump the js-dependencies group across 1 directory with 14 updates 2024-10-28 22:06:46 -07:00
package.json Bump the js-dependencies group across 1 directory with 14 updates 2024-10-28 22:06:46 -07:00
Procfile Add monitor dyno 2024-01-16 12:41:16 +03:00
Rakefile Automatically use parallel testing in Rakefile 2024-10-28 16:32:18 -07:00
README.md Update Ubicloud banner in README.md 2024-09-11 13:57:12 +02:00
redocly.yaml Add OpenAPI specification and linting/formatting tool 2024-09-04 06:21:37 -07:00
tailwind.config.js Add certain colors and width percentages to safelist 2024-07-26 12:47:45 +02:00
ubid.rb Make name and ubid lookups more similar in project/location routes 2024-10-24 08:48:59 -07:00

Ubicloud CI Build Learn this repo using Greptile

Ubicloud is an open source cloud that can run anywhere. Think of it as an open alternative to cloud providers, like what Linux is to proprietary operating systems.

Ubicloud provides IaaS cloud features on bare metal providers, such as Hetzner, Leaseweb, and AWS Bare Metal. You can set it up yourself on these providers or you can use our managed service. We're currently in public beta.

Quick start

Managed platform

You can use Ubicloud without installing anything. When you do this, we pass along the underlying provider's benefits to you, such as price or location.

https://console.ubicloud.com

Build your own cloud

You can also build your own cloud. To do this, start up Ubicloud's control plane and connect to its cloud console.

git clone git@github.com:ubicloud/ubicloud.git

# Generate secrets for demo
./demo/generate_env

# Run containers: db-migrator, app (web & respirate), postgresql
docker-compose -f demo/docker-compose.yml up

# Visit localhost:3000

The control plane is responsible for cloudifying bare metal Linux machines. The easiest way to build your own cloud is to lease instances from one of those providers. For example: https://www.hetzner.com/sb

Once you lease instance(s), run the following script for each instance to cloudify the instance. By default, the script cloudifies bare metal instances leased from Hetzner. After you cloudify your instances, you can provision and manage cloud resources on these machines.

# Enter hostname/IP and provider, and install SSH key as instructed by script
docker exec -it ubicloud-app ./demo/cloudify_server

Later when you create VMs, Ubicloud will assign them IPv6 addresses. If your ISP doesn't support IPv6, please use a VPN or tunnel broker such as Mullvad or Hurricane Electric's https://tunnelbroker.net/ to connect. Alternatively, you could lease IPv4 addresses from your provider and add them to your control plane.

Why use it

Public cloud providers like AWS, Azure, and Google Cloud have made life easier for start-ups and enterprises. But they are closed source, have you rent computers at a huge premium, and lock you in. Ubicloud offers an open source alternative, reduces your costs, and returns control of your infrastructure back to you. All without sacrificing the cloud's convenience.

Today, AWS offers about two hundred cloud services. Ultimately, we will implement 10% of the cloud services that make up 80% of that consumption.

Example workloads and reasons to use Ubicloud today include:

  • You have an ephemeral workload like a CI/CD pipeline (we're integrating with GitHub Actions), or you'd like to run compute/memory heavy tests. Our managed cloud is ~3x cheaper than AWS, so you save on costs.

  • You want a portable and simple app deployment service like Kamal. We're moving Ubicloud's control plane from Heroku to Kamal; and we want to provide open and portable services for Kamal's dependencies in the process.

  • You have bare metal machines sitting somewhere. You'd like to build your own cloud for portability, security, or compliance reasons.

Status

Ubicloud is in public beta. You can provide us your feedback, get help, or ask us to support your network environment in the Community Forum.

We follow an established architectural pattern in building public cloud services. A control plane manages a data plane, where the data plane leverages open source software. You can find our current cloud components / services below.

  • Elastic Compute: Our control plane communicates with Linux bare metal servers using SSH. We use Cloud Hypervisor as our virtual machine monitor (VMM); and each instance of the VMM is contained within Linux namespaces for further isolation / security.

  • Networking: We use IPsec tunneling to establish an encrypted and private network environment. We support IPv4 and IPv6 in a dual-stack setup and provide both public and private networking. For security, each customers VMs operate in their own networking namespace. For firewalls and load balancers, we use Linux nftables.

  • Block Storage, non replicated: We use Storage Performance Development Toolkit (SPDK) to provide virtualized block storage to VMs. SPDK enables us to add enterprise features such as snapshot and replication in the future. We follow security best practices and encrypt the data encryption key itself.

  • Attribute-Based Access Control (ABAC): With ABAC, you can define attributes, roles, and permissions for users and give them fine-grained access to resources. You can read more about our ABAC design here.

  • What's Next?: We're planning to work on a managed K8s or metrics/monitoring service next. If you have a workload that would benefit from a specific cloud service, please get in touch with us through our Community Forum.

  • Control plane: Manages data plane services and resources. This is a Ruby program that stores its data in Postgres. We use the Roda framework to serve HTTP requests and Sequel to access the database. We manage web authentication with Rodauth. We communicate with data plane servers using SSH, via the library net-ssh. For our tests, we use RSpec.

  • Cloud console: Server-side web app served by the Roda framework. For the visual design, we use Tailwind CSS with components from Tailwind UI. We also use jQuery for interactivity.

If youd like to start hacking with Ubicloud, any method of obtaining Ruby and Postgres versions is acceptable. If you have no opinion on this, our development team uses asdf-vm as documented here in detail.

Greptile provides an AI/LLM that indexes Ubicloud's source code can answer questions about it.

FAQ

Do you have any experience with building this sort of thing?

Our founding team comes from Azure; and worked at Amazon and Heroku before that. We also have start-up experience. We were co-founders and founding team members at Citus Data, which got acquired by Microsoft.

How is this different than OpenStack?

We see three differences. First, Ubicloud is available as a managed service (vs boxed software). This way, you can get started in minutes rather than weeks. Since Ubicloud is designed for multi-tenancy, it comes with built-in features such as encryption at rest and in transit, virtual networking, secrets rotation, etc.

Second, we're initially targeting developers. This -we hope- will give us fast feedback cycles and enable us to have 6 key services in GA form in the next two years. OpenStack is still primarily used for 3 cloud services.

Last, we're designing for simplicity. With OpenStack, you pick between 10 hypervisors, 10 S3 implementations, and 5 block storage implementations. The software needs to work in a way where all of these implementations are compatible with each other. That leads to consultant-ware. We'll take a more opinionated approach with Ubicloud.