Skip to content

Instantly share code, notes, and snippets.

View shpaz's full-sized avatar

Shon Paz shpaz

View GitHub Profile

How To Install MicroShift On NVIDIA Jetson Xavier

In this procedure, we'll walkthrough the installation of MicroShift on an Jetson Xavier server. This procedure holds all the prerequisites and instructions in order to get your MicroShift server up and running.

Prerequisites

Before you start, make sure that you have the following prereqs met:

  • Jetson Xavier (Should be connected to some network)
  • Ubuntu 18.04 (L4T, AKA Linux For Tegra, Should come with the Jetson itself by default)
apiVersion: integreatly.org/v1alpha1
kind: GrafanaDataSource
metadata:
name: prometheus-grafanadatasource
spec:
datasources:
- access: proxy
editable: true
isDefault: true
jsonData:
apiVersion: integreatly.org/v1alpha1
kind: Grafana
metadata:
name: my-grafana-instance
spec:
config:
metrics:
basic_auth_password: admin
basic_auth_username: password
enabled: true
kind: PrometheusRule
metadata:
name: webapp-alerting
spec:
groups:
- name: webapp-alerting
rules:
- alert: AppNotHealthy
annotations:
description: Your system is in an unhealthy state.
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app: webapp
name: prometheus-webapp-monitor
spec:
endpoints:
- bearerTokenSecret:
key: ''
kind: Deployment
apiVersion: apps/v1
metadata:
name: webapp
spec:
replicas: 1
selector:
matchLabels:
app: webapp
template:
"""Application exporter"""
import os
import time
from prometheus_client import start_http_server, Gauge, Enum
import requests
class AppMetrics:
"""
Representation of Prometheus metrics and loop to fetch and transform
from flask import Flask
from flask import request, jsonify
import random
app = Flask(__name__)
@app.route("/")
def home():
return "Welcome to my exporter application! Nice to meet you!"
<!DOCTYPE html>
<html>
<head>
<title>Openshift Virtualization Demo</title>
</head>
<body>
<h1>This is an Openshift Virtualization Demo on server {{inventory_hostname }} </h1>
<img src="https://i.ytimg.com/vi/345uHQVwWic/maxresdefault.jpg" alt="Simply Easy Learning" width="1500"
height="750">
</body>
apiVersion: v1
kind: Service
metadata:
name: "{{ item }}"
namespace: "{{ namespace }}"
annotations:
metallb.universe.tf/address-pool: example
spec:
ports:
- port: 22