GithubHelp home page GithubHelp logo

philippart / metal3-dev-env Goto Github PK

View Code? Open in Web Editor NEW

This project forked from metal3-io/metal3-dev-env

1.0 0.0 0.0 2.04 MB

Metal³ Development Environment

License: Apache License 2.0

Shell 79.00% Python 9.00% Makefile 1.87% Smarty 1.62% Jinja 8.52%

metal3-dev-env's Introduction

Metal³ Development Environment

This repository includes scripts to set up a Metal³ development environment.

Build Status

Ubuntu daily main build status CentOS daily main build status Ubuntu daily release-0.5 build status CentOS daily release-0.5 build status

Instructions

Instructions can be found here: https://metal3.io/try-it.html

Quickstart

Versions v1alpha5 or v1beta1 are later referred as v1alphaX/v1betaX.

The v1alphaX or v1betaX deployment can be done with Ubuntu 18.04, 20.04, 22.04 or Centos 9 Stream target host images. By default, for Ubuntu based target hosts we are using Ubuntu 22.04

Requirements

Dev env size

The requirements for the dev env machine are, when deploying Ubuntu target hosts:

  • 8GB of memory
  • 4 cpus

And when deploying Centos target hosts:

  • 16GB of memory
  • 4 cpus

The Minikube machine is deployed with 4GB of RAM, and 2 vCPUs, and the target hosts with 4 vCPUs and 4GB of RAM.

Environment variables

Select:

export CAPM3_VERSION=v1alpha5
export CAPI_VERSION=v1alpha4

or

export CAPM3_VERSION=v1beta1
export CAPI_VERSION=v1beta1

The following environment variables need to be set for Centos:

export IMAGE_OS=centos

And the following environment variables need to be set for Ubuntu:

export IMAGE_OS=ubuntu

And the following environment variables need to be set for Flatcar:

export IMAGE_OS=flatcar

You can check a list of all the environment variables here

Deploy the metal3 Dev env

./01_prepare_host.sh
./02_configure_host.sh
./03_launch_mgmt_cluster.sh

or

make

Deploy the target cluster

./tests/scripts/provision/cluster.sh
./tests/scripts/provision/controlplane.sh
./tests/scripts/provision/worker.sh

Pivot to the target cluster

./tests/scripts/provision/pivot.sh

Delete the target cluster

kubectl delete cluster "${CLUSTER_NAME:-"test1"}" -n metal3

Deploying with Tilt

It is possible to use Tilt to run the CAPI, BMO and CAPM3 components. For this, run:

export EPHEMERAL_CLUSTER="tilt"
make

Then clone the Cluster API Provider Metal3 repository, and follow the instructions. That will mostly be the three following blocks of commands.

source lib/common.sh
source lib/network.sh
source lib/images.sh

and go to the CAPM3 repository and run

make tilt-settings

Please refer to the CAPM3 instructions to include BMO and IPAM. Then run :

make tilt-up

Once the cluster is running, you can create the BareMetalHosts :

kubectl create namespace metal3
kubectl apply -f examples/metal3crds/metal3.io_baremetalhosts.yaml
kubectl apply -n metal3 -f /opt/metal3-dev-env/bmhosts_crs.yaml

Afterwards, you can deploy a target cluster.

If you are running tilt on a remote machine, you can forward the web interface by adding the following parameter to the ssh command -L 10350:127.0.0.1:10350

Then you can access the Tilt dashboard locally here

Recreating local ironic containers

In case, you want recreate the local ironic containers enabled with TLS, you need to use the following instructions:

source lib/common.sh
source lib/network.sh

export IRONIC_HOST="${CLUSTER_URL_HOST}"
export IRONIC_HOST_IP="${CLUSTER_PROVISIONING_IP}"

source lib/ironic_tls_setup.sh
source lib/ironic_basic_auth.sh

cd ${BMOPATH}
./tools/run_local_ironic.sh

Here ${BMOPATH} points to the baremetal operator directory. For more information, regarding the TLS setup and running ironic locally please refer to these documents: TLS , Run local ironic.

metal3-dev-env's People

Contributors

alosadagrande avatar ardaguclu avatar bcrochet avatar cybertron avatar derekhiggins avatar dhellmann avatar dtantsur avatar e-minguez avatar elfosardo avatar fmuyassarov avatar furkatgofurov7 avatar ian-howell avatar jaakko-os avatar jan-est avatar kashifest avatar lentzi90 avatar macaptain avatar maelk avatar markmc avatar mboukhalfa avatar metal3-io-bot avatar mikkosest avatar namnx228 avatar renovate-bot avatar rozzii avatar russellb avatar smoshiur1237 avatar stbenjam avatar sunnatillo avatar wgslr avatar

Stargazers

 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.