Skip to content

home-cloud-io/core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

206 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Home Cloud

The easy-to-use solution that enables you to say goodbye to the high-cost, privacy nightmare of Big Tech services so that you can finally take back control over your digital life!

For more info: https://home-cloud.io/

Contents

This repository contains the core components that make up the Home Cloud platform. These include:

  • daemon: a system service that manages a Talos installation and low-level host commands (like reboots)
  • locator: a zero-trust service discovery engine to enable remote access to Home Cloud servers when not at home
  • mdns: a lightweight mDNS server which creates mDNS entries based off of Kubernetes Service annotations
  • operator: a Kubernetes operator which manages the Home Cloud installation itself as well as user installed Apps
  • server: the primary service that manages users, settings, and hosts the Home Cloud web interface
  • tunnel: a small Kubernetes operator which uses the locator to create Wireguard tunnels to mobile devices

Requirements

To work on the Home Cloud core platform you'll need a couple of things installed:

Getting Started

This repository is built on top of the Draft framework for distributed systems. You don't need to be an expert with Draft to work with the Home Cloud core platform, but you'll need at least the dctl CLI tool.

Let's install it now:

go install github.com/steady-bytes/draft/tools/dctl@latest

We'll need to import this project as a context into dctl so it can manage things for us. After cloning the repo run the below command from the root of the repo:

dctl context import

Let's do a quick test of building the Home Cloud API protobufs:

dctl api init
dctl api build

Development

local Talos cluster

You'll need a Talos cluster for development. We'll create one to run in Docker locally:

talosctl cluster create docker --workers 0

Now create the home-cloud-system namespace which will be needed later:

kubectl create namespace home-cloud-system

CRDs

First install the Home Cloud CRDs to the cluster:

kubectl apply -f https://github.com/home-cloud-io/core/releases/latest/download/crds.yaml
kubectl apply -f https://github.com/home-cloud-io/core/releases/latest/download/operator.yaml
kubectl apply -f https://github.com/home-cloud-io/core/releases/latest/download/install.yaml

daemon

You can run the daemon with:

cd cmd/daemon
go run main.go

operator

Before running the operator, we need to first build the web client that is hosted by the operator:

# install api dependencies
cd api
npm install
# install client dependencies
cd ../web/client
npm install
npm run build

You can run the operator with:

cd cmd/operator
go run -flags=client main.go

web client

If you're developing the web client, you can run it in development mode:

cd web/client
npm start

This will open your browser to the web client running locally on localhost:3000 and proxying all requests to the home cloud server running on localhost:8000.

Install Steps

# install talosctl
curl -sL https://talos.dev/install | sh
# install kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"

# get from machine display out
export MACHINE_IP="192.168.1.183"

# generate config files
talosctl gen secrets -o secrets.yaml
talosctl gen config --with-secrets secrets.yaml home-cloud https://${MACHINE_IP}:6443

# update `install.disk` in controlplane.yaml
talosctl --nodes ${MACHINE_IP} get disks --insecure

# add home cloud specific config to controlplane.yaml

# apply config
talosctl apply-config --insecure --nodes ${MACHINE_IP} --file controlplane.yaml

# save config
talosctl config merge ./talosconfig

# set endpoint
talosctl config endpoint ${MACHINE_IP}

# install kubernetes
talosctl bootstrap --nodes ${MACHINE_IP}

# save kubeconfig
talosctl kubeconfig kubeconfig --nodes ${MACHINE_IP}
export KUBECONFIG=./kubeconfig

# check connection
kubectl get nodes

# install home cloud manifests
kubectl create namespace home-cloud-system
kubectl apply -f https://github.com/home-cloud-io/core/releases/latest/download/crds.yaml
kubectl apply -f https://github.com/home-cloud-io/core/releases/latest/download/operator.yaml
kubectl apply -f https://github.com/home-cloud-io/core/releases/latest/download/install.yaml

# wait until the operator is ready
kubectl get deployment operator -n home-cloud-system -w

About

The easy-to-use solution that enables you to say goodbye to the high-cost, privacy nightmare of Big Tech services so that you can finally take back control over your digital life.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors