Coder Social home page Coder Social logo

infra-prox-ew1's Introduction

infra-prox-ew1

Repository structure

Path Description
ct/ contains LXC related resources.
helm/ contains guides for helm.
net/ contains networking related resources.
tf/ contains terraform modules & related resources.
vm/ contains Virtual Machine related resources.

Disclaimer

My homelab datacenter is a fun project, the goal is to have fun & enjoy the time spent on it. Thus, nothing in this repository should be taken seriously.

Especially my choice to use Alpine everywhere.

Alpine is my favorite distribution, I like muslc, busybox & apk. With Alpine, you're also not concerned by the famous GNU/Linux copypasta.

This choice is a complete joke, therefor please don't take it seriously.

Getting started

This repository is dedicated to proxmox infrastructure in our eu-west-1 datacenter (France). infra: infrastructure, prox: proxmox & ew1: datacenter in eu-west-1.

To get started with the repository I strongly suggest to checkout the vm/ folder & checkout the different docs.

Proxmox startup

cat <<EOF > /etc/apt/sources.list
deb http://ftp.debian.org/debian bullseye main contrib
deb http://ftp.debian.org/debian bullseye-updates main contrib

## PVE pve-no-subscription repository provided by proxmox.com,
## NOT recommended for production use
deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription

## security updates
deb http://security.debian.org/debian-security bullseye-security main contrib
EOF
apt update -y && apt upgrade -y && sync

Proxmox-cli

Please install proxmox-cli for a better user experience.

Proxmox-cli is a simple bash wrapper around the Proxmox REST API.It requires curl & jq, so please make sure to have them installed.

Curl the API

If you prefer to curl the API directly, here are a few steps to get started:

Setup

export PM_API_URL=https://node0.mahdhaoui.com:8006/api2/json
export PM_USER_NAME=alexandre.mahdhaoui
export PM_USER_DOMAIN=pam
read -sp "Password? " PM_PASS

Authenticate

pve.auth() {
  curl -k -s\
    -d "username=$PM_USER_NAME@$PM_USER_DOMAIN"\
    --data-urlencode "password=$PM_PASS" "$PM_API_URL/access/ticket"
}
export PM_AUTH_COOKIE="PVEAuthCookie=$(pve.auth | jq '.data.ticket' | sed 's/\"//g' )"
export PM_CSRF_HEADER="CSRFPreventionToken: $(pve.auth | jq '.data.CSRFPreventionToken')"

Request the API

curl -k -b "$PM_AUTH_COOKIE" -H "$PM_CSRF_HEADER" "$PM_API_URL/nodes/node0/qemu" | jq

infra-prox-ew1's People

Contributors

alexandremahdhaoui 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.