Giter VIP home page Giter VIP logo

kube-opennebula's Introduction

Kube-OpenNebula

Helm chart and OpenNebula images ready to deploy on Kubernetes

Quick start

Control plane

  • Create namespace:

    kubectl create namespace opennebula
  • Install Helm repo:

    helm repo add kvaps https://kvaps.github.io/charts
  • Deploy OpenNebula:

    # download example values
    helm show values kvaps/opennebula --version 1.2.0 > values.yaml
    
    # install release
    helm install opennebula kvaps/opennebula --version 1.2.0 \
      --namespace opennebula \
      --set oned.createCluster=1 \
      -f values.yaml \
      --wait

Compute nodes

  • To deploy external compute node your hosts should have libvirtd and qemu-kvm installed and configured sudoers.
    However you can just install opennebula-node meta-package.

  • Get OpenNebula's ssh-key, and place it to /var/lib/one/.ssh/authorized_keys on every node to allow OpenNebula login via ssh.

    kubectl exec opennebula-opennebula-oned-0 -c oned -- ssh-keygen -y -f /var/lib/one/.ssh/id_rsa
  • Create new host via OpenNebula Interface.

  • Check is everything is fine
    You should be able login via ssh from oned pod to every node. You can check that by executing the following command:

    kubectl exec -ti opennebula-opennebula-oned-0 ssh <node>

Customization

Sometimes you need to perform some customization, eg. update sunstone views and addtitional drivers, etc.

All these customizations could be done by updating dockerimages, you can find some examples here, or by simple using extraVolumes and extraVolumeMounts in chart values.

Production setup

Production install assumes having persistent storage.

OpenNebula requires one ReadWriteOnce persistent volume per each oned-instance where database files will be stored, even local volumes enough for that, however it also requires one shared (ReadWriteMany) persistent volume for virtual machine logs and vnc tokens, take a look at nfs-server-provisioner if you'r storage does not support ReadWriteMany.

Example production configuration can be found here

Backups and restore

Find current leader:

kubectl get pod -n opennebula -l role=leader

Perform backup:

kubectl exec -n opennebula -c oned <leader_pod> -- sh -c 'mysqldump -h$DB_SERVER -u$DB_USER -p$DB_PASSWD $DB_NAME | gzip -9' > opennebula-db.sql.gz

To restore, redeploy release with --set oned.debug=true and:

kubectl exec -n opennebula -i -c oned <each_oned_pod> -- sh -c 'zcat | mysql -h$DB_SERVER -u$DB_USER -p$DB_PASSWD -D$DB_NAME' < opennebula-db.sql.gz

then disable debug

Upgrade notes

kubectl get pod -n opennebula -l role=leader

Perform backup:

kubectl exec -n opennebula -c oned <leader_pod> -- sh -c 'mysqldump -h$DB_SERVER -u$DB_USER -p$DB_PASSWD $DB_NAME | gzip -9' > opennebula-db.sql.gz

To restore, redeploy release with --set oned.debug=true and:

kubectl exec -n opennebula -i -c oned <each_oned_pod> -- sh -c 'zcat | mysql -h$DB_SERVER -u$DB_USER -p$DB_PASSWD -D$DB_NAME' < opennebula-db.sql.gz

then disable debug

Upgrade notes

The minor upgrades can be performed by standard way using rolling update, however major updates must be performed by fully chart reinstallation.
You have to remove the old chart, and install new one. No worry as your data should be saved on persistent volumes, thus new images will perform database migration on their first start.

Warning: Don't forget to make backup before the upgrade!

Minor upgrade:

helm upgrade opennebula kvaps/opennebula --version 1.2.0 \
  --namespace opennebula \
  -f values.yaml \
  --wait

Major upgrade:

# Remove the chart
helm remove opennebula \
  --namespace opennebula

# Deploy the new chart
helm upgrade opennebula kvaps/opennebula --version 1.2.0 \
  --namespace opennebula \
  -f values.yaml \
  --wait

kube-opennebula's People

Contributors

kvaps avatar soudnyl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

kube-opennebula's Issues

Consider using augtool to process oned.conf

Example:

augtool -s <<EOT
rm /files/etc/one/oned.conf/DB
set /files/etc/one/oned.conf/DB/BACKEND "${DB_BACKEND}"
set /files/etc/one/oned.conf/DB/SERVER "${DB_SERVER}"
set /files/etc/one/oned.conf/DB/DB_PORT "${DB_PORT}"
set /files/etc/one/oned.conf/DB/USER "${DB_USER}"
set /files/etc/one/oned.conf/DB/PASSWD "${DB_PASSWD}"
set /files/etc/one/oned.conf/DB/DB_NAME "${DB_NAME}"
set /files/etc/one/oned.conf/DB/DB_CONNECTIONS "${DB_NAME}"
set /files/etc/one/oned.conf/DB/ENCODING "${DB_ENCODING}"
EOT
augtool -s <<EOT
rm /files/etc/one/oned.conf/FEDERATION
set /files/etc/one/oned.conf/FEDERATION/MODE "${FEDERATION_MODE}"
set /files/etc/one/oned.conf/FEDERATION/ZONE_ID "${FEDERATION_ZONE_ID}"
set /files/etc/one/oned.conf/FEDERATION/SERVER_ID "${FEDERATION_SERVER_ID}"
set /files/etc/one/oned.conf/FEDERATION/MASTER_ONED "${FEDERATION_MASTER_ONED}"
EOT

Script oned.aug already coming with opennebula package:

opennebula: /usr/share/augeas/lenses/oned.aug

so there is need only to install augeas-tools package for the augtool.

login credentials

I have deployed the opennebula in cluster. now i can able to view opennebula login screen. i don't have login credential for opennebula. how to get login credentails to logon opennebula?

Kernel Panic occurs sometimes

# uname -a
Linux m1c4 4.4.0-112-generic #135 SMP Wed Jan 31 19:22:30 CET 2018 x86_64 x86_64 x86_64 GNU/Linux
[  327.775517] kvm [24974]: vcpu0 disabled perfctr wrmsr: 0xc2 data 0xffff
[  484.823309] INFO: task qemu-system-x86:25285 blocked for more than 120 seconds.
[  484.914837]       Tainted: G           OE   4.4.0-112-generic #135
[  484.992783] BUG: unable to handle kernel NULL pointer dereference at           (null)

Installing on minikube

While trying to deploy opennebula via helm on a minikube, I receive

helm template . | kubectl apply -n opennebula -f -
service/opennebula-novnc unchanged
Error from server (Invalid): error when creating "STDIN": Secret "RELEASE-NAME-opennebula-one-keys" is invalid: metadata.name: Invalid value: "RELEASE-NAME-opennebula-one-keys": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is 'a-z0-9?(.a-z0-9?)*')

Deployment of current OpenNebula 6.0 release

Hello,
my assumption is that this would perform a Multi-container deployment of OpenNebula 5.x frontend. The compute node(s) is not included.
If this is correct, how would I deploy the latest OpenNebula 6.0 release?

If this is incorrect, can you please explain the use case of this project?

THX

Allocated CPU and Allocated memory issue

I have deployed opennebula in k8s cluster but allocated CPU and allocated memory is not allocated for host. how to allocate memory for host.

I have attached opennebula dashboard screenshot. please check.
open_error

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.