GithubHelp home page GithubHelp logo

elektito.com's Introduction

elektito.com config

This repository contains the configuration and the scripts to setup elektito.com website and gemini capsule. The configuration has been tested on Ubuntu 22.04.

You are going to need a certificate. For a first time setup, you can use the following command to generate a 10-year valid self-signed certificate:

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes -addext "subjectAltName = DNS:elektito.com"

The script expects the key.pem and cert.pem files to be present in the working directory.

qemu test

Create a metadata.yaml file with contents like this:

instance-id: test-vm1
local-hostname: cloudimg

Create a user-data.yaml file with contents like this:

#cloud-config
ssh_authorized_keys:
  - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7MGk+L1Gy3V6sVXNQs5vnSXWGTgqN7lAxSM3nz6Q1yKrpABRrS9Mk++5Cn9vxraW9O/Rw/DsUROL5K5QTDQiaOu09bz4nbyQzXu/TGMQdO1ceaYxylefJ5w4pjiXR+Zrxux6Z7ZfsdT1BSeR4xoezLwfOdG8f5ewlcZQbpxldWqOEUkwihpOxl+3PFyOpqjP1utLjxTLLKcM9xQ9CMj7VvquP/5oTlWWbZToUp3lpenju9VLGVJ5WbtadNdY3J3e9xp7zaZHWWGdHy3VZU6YT8/PDsP57UV6lFWG452Pkyrr9TLmxXNZKYriEye9VQN3f5dXluZ5MsDAfpNemj9Bf mostafa@elektito
mounts:
  - [ shared0, /mnt, "9p", "trans=virtio,version=9p2000.L"]

Create seed image:

cloud-localds seed.img user-data.yaml metadata.yaml

Download base image:

wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img

Create disk image:

qemu-img create -f qcow2 -F qcow2 -b jammy-server-cloudimg-amd64.img foo.qcow2

Run qemu (fix shared directory path in -virtfs option, and possibly the security_model):

qemu-system-x86_64 \
    -machine accel=kvm,type=q35 \
    -cpu host \
    -m 2G \
    -nographic \
    -device virtio-net-pci,netdev=net0 \
    -netdev user,id=net0,hostfwd=tcp::2222-:22 \
    -drive if=virtio,format=qcow2,file=foo.qcow2 \
    -drive if=virtio,format=raw,file=seed.img \
    -virtfs local,path=/home/mostafa/source/elektito.com/,mount_tag=shared0,security_model=mapped-xattr,id=shared0 \
    -snapshot 

You can then ssh into the machine using:

ssh -p 2222 [email protected]

elektito.com's People

Contributors

elektito avatar

Watchers

 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.