Giter Club home page Giter Club logo

nubo-init's Introduction

nobu-init

multipass

Multipass is a lightweight VM manager for Linux, Windows and macOS. It's designed for developers who want a fresh Ubuntu environment with a single command. It uses KVM on Linux, Hyper-V on Windows and HyperKit on macOS to run the VM with minimal overhead. It can also use VirtualBox on Windows and macOS. Multipass will fetch images for you and keep them up to date.

Since it supports metadata for cloud-init, you can simulate a small cloud deployment on your laptop or workstation.

QEMU -> LXD

multipass set local.driver=lxd

usage

jellyfin

multipass launch 20.04 --name jellyfin --cloud-init jellyfin.yaml
multipass exec jellyfin -- sudo service jellyfin status
# ● jellyfin.service - Jellyfin Media Server
#      Loaded: loaded (/lib/systemd/system/jellyfin.service; enabled; vendor pres>
#     Drop-In: /etc/systemd/system/jellyfin.service.d
#              └─jellyfin.service.conf
#      Active: active (running) since Wed 2022-05-04 11:55:38 CEST; 1min 37s ago

bitcoin

multipass launch --name btc --cloud-init bitcoin.yaml --disk 40G # testnet blockchain
multipass exec btc -- bitcoin-cli -testnet getblockchaininfo
# {
#   "chain": "test",
#   "blocks": 0,
#   "headers": 0,
#   "bestblockhash": "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943",
#   "difficulty": 1,
#   "time": 1296688602,
#   "mediantime": 1296688602,
#   "verificationprogress": 1.595119552376496e-08,
#   "initialblockdownload": true,
#   "chainwork": "0000000000000000000000000000000000000000000000000000000100010001",
#   "size_on_disk": 293,
#   "pruned": false,
#   "warnings": ""
# }

expose multipass guest to your network

All these commands are temporary, if you want them to persist after reboot, please use crontab.

activate ip forwarding

sysctl -w net.ipv4.ip_forward=1

Gather informations

host link:

ip link 
LINK=eth0

guest ip:

multipass info jellyfin | grep "IPv4:.*" # show guest ip
IP=10.204.183.40

guest port:

PORT=8096 # default jellyfin port

iptables

sudo iptables -t nat -I PREROUTING 1 -i $LINK -p tcp --dport $PORT -j DNAT --to-destination $IP:$PORT
sudo iptables -I FORWARD 1 -p tcp -d $IP --dport $PORT -j ACCEPT

nubo-init's People

Contributors

ethicnology avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.