HYPERLEDGER FABRIC via Kubernetes

First things first:

curl -sS https://starship.rs/install.sh | sh # get a starship
eval "$(starship init zsh)" # get on board
mkdir -p workspace/ideal
git init .
git config  user.email "[email protected]"
git config  user.name "LarsenClose"
ls
vim setup_hyperledger_fabric.sh
#!/bin/bash

set -e

# Function to check and install kubectl
install_kubectl() {
    if ! command -v kubectl &> /dev/null; then
        echo "kubectl not found. Installing it now."
        curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
        chmod +x ./kubectl
        sudo mv ./kubectl /usr/local/bin/kubectl
    fi
    kubectl version --client
}

# Function to check and install helm
install_helm() {
    if ! command -v helm &> /dev/null; then
        echo "helm not found. Installing it now."
        curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
    fi
    helm version
}

# Function to install Python3 and create virtual environment
install_python_venv() {
    sudo apt-get update
    sudo apt-get install -y python3 python3-venv python3-pip
    python3 -m venv hyperledger_venv
}

# Function to check and install ansible within venv
install_ansible() {
    . hyperledger_venv/bin/activate
    pip install --upgrade pip
    pip install ansible
    pip install kubernetes
    ansible --version
}

# Start Minikube
start_minikube() {
    minikube start --driver=docker
    kubectl config use-context minikube
}

# Create Kubernetes namespace
create_namespace() {
    kubectl create namespace oss-hlf-infra
}

# Clone the Hyperledger Fabric Ansible playbooks repository
clone_ansible_fabric() {
    if [ ! -d "fabric-ansible-collection" ]; then
        git clone https://github.com/hyperledger-labs/fabric-ansible-collection.git
    fi
    cd fabric-ansible-collection
}

# Build and install the Ansible collection from source
install_ansible_collection() {
    . ../hyperledger_venv/bin/activate
    ansible-galaxy collection build
    ansible-galaxy collection install hyperledger-fabric_ansible_collection-*.tar.gz
}

# Create Kubernetes secret for TLS
create_tls_secret() {
    mkdir -p tls
    openssl req -x509 -newkey rsa:4096 -keyout tls/tls.key -out tls/tls.crt -days 365 -nodes -subj "/CN=myfabric.local"
    kubectl create secret tls myfabric-tls-secret --cert=tls/tls.crt --key=tls/tls.key -n oss-hlf-infra
}

# Create Ansible inventory file
create_inventory_file() {
    cat <<EOF > inventory.ini
[all]
localhost ansible_connection=local

[k8s-cluster]
localhost

[hyperledger_fabric]
localhost
EOF
}

# Create Ansible playbook file
create_playbook_file() {
    cat <<EOF > install-oss.yml
---
- name: Deploy Hyperledger Fabric Open Source Operator and Custom Resource Definitions
  hosts: localhost
  vars:
    state: present
    target: k8s
    arch: amd64
    namespace: oss-hlf-infra
    wait_timeout: 3600
  roles:
    - hyperledger.fabric_ansible_collection.fabric_operator_crds

- name: Deploy Hyperledger Fabric Open Source Console
  hosts: localhost
  vars:
    state: present
    target: k8s
    arch: amd64
    namespace: oss-hlf-infra
    console_name: myfabric-console
    console_domain: myfabric.local
    console_email: [email protected]
    console_default_password: adminpw
    console_storage_class: standard
    console_tls_secret: myfabric-tls-secret
    wait_timeout: 3600
  roles:
    - hyperledger.fabric_ansible_collection.fabric_console
EOF
}

# Run the Ansible playbook to provision Hyperledger Fabric
run_ansible_playbook() {
    . ../hyperledger_venv/bin/activate
    ansible-playbook -i inventory.ini install-oss.yml -vvv
}

# Main function to orchestrate the setup
main() {
    install_kubectl
    install_helm
    install_python_venv
    . hyperledger_venv/bin/activate
    install_ansible
    start_minikube
    create_namespace
    create_tls_secret
    clone_ansible_fabric
    install_ansible_collection
    create_inventory_file
    create_playbook_file
    run_ansible_playbook

    # Check the status of the pods
    echo "Checking the status of the pods in the namespace oss-hlf-infra..."
    kubectl get pods -n oss-hlf-infra

    echo "If there are any issues, you can check the logs of the individual pods using:"
    echo "kubectl logs <pod-name> -n oss-hlf-infra"
}

# Execute the main function
main


next:

Multi-tenant cluster-api platform agnostic production ready high-availability

Nesting-Virtualization(recur):

efficiency, resiliency, reproducibility

Found a helpful script for templating virtual machines on proxmox hosts

Added value: automated, fast, templating, now including integrity checking without missing a beat

https://gist.github.com/LarsenClose/8242df1252551dc9944a229e9df2b542

Kinetic Kudu[ubuntu 22.04 cloudimg] psionic non-voodoo

Republishing: templating with integrity checking, {con}templation in accord with integrity is in accord with excellence, Aristotle meet virtual machines running virtual machines running containerized images of machines. Going to have to change the site tag to projects, programming and puns.

M.2 Boot Pi 4 Hirsute Hippo EZ/PZ, Great relief.

Why SSD drives just to USB boot? A little bit faster and a lot more stable.

Why a more stable raspberry pi?

This is a large search space.. Running a node for Web 3.0 services, a node for any decentralized infrastructure, DeFi, IPFS, the Graph, ETH[…]

After following several tutorials which failed along with thousands of line of code dedicated to automating the setup for USB boot from a sata drive [transferring or cloning from an SD card] it felt like duty to write a quick post. I hope this saves someone time, perhaps frustration, and certainly as in my own case, feeling silly for having not started with this obvious approach.

After all the ‘USB boot on Ubuntu 21.4 server with a raspberry pi 4’– + similar, tutorials and scripts all failed, I thought about it and… Eureka! I plugged it in. I just flashed the image directly to my drive via USB. After trying lots of cables I found that using one of the USB 180° male – male adapters to connect to the drive worked with most other combinations.

Then just flash it like you would an sd card, configure system-boot just like an sd card and boot with only the usb connection to the drive [no sd card].

I haven’t tested with other images or pi’s [only pi 4 64bit ubuntu 21.04 image for raspi]– as this is ancillary to my task at hand, but I certainly would try this before what seem like incredibly silly methods in retrospect from tutorials I came across.

https://ubuntu.com/download/raspberry-pi

THIS TYPE TAKES MORE WORK

Not a lot more work, but some. Here flash ssd drive and sd card and connect or insert them both. Then ssh to the device and do a full update and upgrade. If you want to really dig in see the documentation at:

https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md

Or just sudo apt install raspi-config and then enter the interface sudo raspi-config and you’ll find the bootloader options under ‘advanced’ sub menu. Select boot usb first and reboot into your ssd drive as root system. —

Gnu Image Manipulation Program practice [EO]

Hypë☈[Ku]bernetes

Relying upon the illusion of totally deterministic hardware and the subsequent locally optimal software design does not persist at scale.

5D hypercube here thanks to a lineage of a James after a Paul who was before a Peter following Oliver [most recently from the 5dstm, 5-dimensional Space-Time-Matter Consortium].

When engaging computational systems at scale these issues are undeniably common knowledge. So we have google to thank for open sourcing their Kubernetes project, circa 2015.

Enter Kubernetes:

(Picture one)Kubernetes Tribute here created with mini/dall-e model from huggingface[…]

Since being able to access the full dall-E model an update was in order with some enhanced remixes.

Kubernetes, a container orchestration system for automating software deployment, scaling, and management. Kubernetes delivers a more resilient and robust architecture.

This has allowed for the scaling of systems to:

While being administered and managed through interfaces like:

The cluster architecture is able to accomplish some more complex behaviors like self healing and some self organization.

Lens has a nice visualization extension which gives a visual rendering of the pods and their direct networked connections with one another in a 2d slice. This is a compilation of recording from a few other clusters, some much larger than this 10 rpi 4b shown in the other tools examples.

[Ku]bernetes tools

Lens also has decent ui/ux for administering and monitoring clusters.

K9s

K9s is a cli-console based program for management and administration

kubenav

Arguably the smoothest administrator interface experience is with Kubenav from your cellphone or desktop.


Longhorn: distributed block storage

Longhorn allows for basically single command setup of dynamically sized distributed block storage for k8s.

To flesh out this topic area going to split into a couple more posts, to be cont. […]

Nzt’s NFT’s – Art Collab with Dall-E

Recently granted access to Dall-E, OpenAI’s new generative Art AI, some of the collaborative works turned out alright. Here’s a few minted as NFT’s on the Solana Block chain.

The textual accompaniments are a mix of imagination, intuitive feel and very interesting results from prompts to a large gpt2 generative text AI model.

Linking to SolSea.io allows clicking the bottom right hand corner of the preview where the small outline of a square appears. Else nearly every method its only possible to see previews.

The Visual-Cortex, a powerful graphics-engine? Expensive compute–

3D

Programming 3D environments without many high level libraries makes clear why the visual-cortex is so large! [expensive it is to compute graphics?] Below are some excerpts of the low level of objects written to build from the ground up, everything. From vertex to triples, to triangles, and beyond– not recommended for anything besides painful learning. Especially with the verbosity of Java, here’s part of a triple class.

import java.nio.FloatBuffer;
import java.util.Scanner;

public class Triple
public double x, y, z;
public Triple( double a, double b, double c ) {
x = a; y = b; z = c;
}
public Triple( Scanner input ) {
x = input.nextDouble();
y = input.nextDouble();
z = input.nextDouble();
input.nextLine();
}

public void sendData( FloatBuffer buff ) {
buff.put( (float) x );
buff.put( (float) y );
buff.put( (float) z );
}

Finally built the castle in the sky

Which is then a part of a single vertex, like below; then with three vertices of 2 triple’s…. *drum roll* we can create a single shaded triangle.

import java.nio.FloatBuffer;
import java.util.Scanner;

public class Vertex {
private Triple position;
private Triple color;
public Vertex( Triple p, Triple c ) {
position = p;
color = c;
}
public Vertex( Scanner input ) {
position = new Triple( input );
color = new Triple( input );
}
public void sendData( FloatBuffer pb, FloatBuffer cb ) {
position.sendData( pb );
color.sendData( cb );
}
}

What is a world? What does it mean to have a world space and a horizon, Res Extensa. It turns out its not really that complicated or difficult to simulate a world, depending on resolution and complexity it can be computationally extensive.

Intimating the major elements involved in rendering a world and a 3-dimensional view point from within that space.



2D

How about simulating many individual agents, each acting according to their own internal rules based on the limited knowledge they have from their perspective [keeping this a bit simpler than game theory with humans]. Two dimensions is plenty, below demonstrates some interesting, beautiful behavior emerging from just 3 simple rules.

This is a python variation I wrote of Craig Reynolds, ‘boids’ algorithm from 1986. The behavior is determined by just 3 rules which each of the boids, or particles in this case, follows for itself. I ran this on my iPad and the compute slowed it to barely a crawl, I sped up the screen recording for this high action production.

There is actually one more rule here, a 4th force helping to keep them on the screen

  • separation: steer to avoid crowding local flock
  • alignment: steer towards the average heading of local flock
  • cohesion: steer to move towards the average position (center of mass) of local flock

Some simple programs like these [even simpler], are turing complete and some sets of rules even create seemingly never ending complexity. If that sounds totally insane then you need to visit Stephen Wolfram’s work.

https://demonstrations.wolfram.com/CobwebDiagramsOfElementaryCellularAutomata/

This is a short little clip from recording the p5js program I uploaded onto a page of my blog on the left side. It allows for the variables controlling length of joining and acceleration/deceleration to be adjusted.

https://larsenclose.com/autopoeticcomplexity/

The following ones are also boids variants, these inspired by some of Daniel Shiffman’s work in his book on simulation nature . It has two flocks with different ranges of starting characteristics, also interactively, tapping the screen adds to each flock. A long screen press toggles what I call visualized entropic mode, were the history of the biods movements is retained. Then shaking the device will clear the screen. I built an APK for Nethunter and one for the Graphene android I had been been working on.

Clearly they behave in some very interesting ways despite being incredibly simple.

Another beautiful visual, the data for this was passively collected from all wireless signals within range.

The local neighborhood, in terms of wireless access points and clients, explored in 3D.

Sustainable Interfacing

i[hyperdimensionality]e

Synthetic Intelligence

In order for language to stay active and alive to itself their must still be an audience for Philosophy. Whether the possibility of philosophy could be lost, if left in a state of wonder then one finds oneself where all philosophy begins.

Relevance of scalable intelligence to Knowing Oneself and the possibility of scaling minds in general. The possible appearance of singularity, and becoming.

The race of temporal minds with scaling intelligence. Novel appearance of the eternal in such a way that currently non-scaling minds could potentially begin to scale and become scaling.

Recounting recent: Dork

A ‘Zork like’ text based rpg called…

My team and I wrote dork in python using scrum implementation of agile method, delivering working fully tested iterations of the code according to product owner specifications derived from customer requests in two week sprints. Documentation is on ‘readthedocs’.
https://gitnick-dork.readthedocs.io/en/latest/readme.html

We used github for version control with travis-ci and sonarcloud for continuous integration and inspection. The full repository is public on github.

https://github.com/LarsenClose/dork

Each new game randomly generates a maze and factories populate the world with descriptions, interactive items and NPC’s from databases. Games can be saved and loaded with persistence of the game state, map, inventory, NPC’s and points.

The project turned out well and was a pleasure to work on. Working with team brought new difficulties the work and complexity of the project we were able to achieve within a short time frame was far beyond what could have been done individually. I have some future expansions planned for the game so stay tuned!

BadroidGoodroid::-GoodroidBadroid::-

GrapheneOS

Kali NetHunter

GrapheneOS has a reputation for currently being one of the most secure and private solutions possible for a phone. Naturally upon hearing about it I had to check it out. Here’s a list of the currently supported devices as of the end of Febuary 2021.

I’ve improved my Nethunter setup quite a bit as well so thought an update was due.

GrapheneOS

With some time into it grapheneOS can really increase anonymity, privacy and security, without the cost of massive functionality. I currently have mine setup with an always on VPN, end to end encrypted communications, tor browser and the ability to switch from VPN to Orbot and proxy all traffic over tor. Permanent add blocking and hardened browsers. Off-line maps so location data and gps can be turned off without losing navigation capacity. Peer to peer decentralized file synchronization along with IPFS-lite.

guardian project/haven

The guardian projects repository can also be imported to whichever FOSS android market you prefer, and though tangential to graphene their application Haven is pretty cool.

https://github.com/guardianproject/haven

Configured with Orbot and your signal account Haven is a multi sensor security system which will securely text you if alarmed as well as having its own onion service you can login to. Haven uses many of the phones sensors to keep real time awareness of its environment, such as picking up any sounds, vibrations, changes in light or movement. Triggering the alarms starts recording from the interfaces and sends an encrypted text via signal. All of these sensors can have their sensitivity adjusted to prevent false alarms. Some of them can be very sensitive without dialing it down. I recommend calibrating it a bit ‘live’ else you might come back to a phone with 100% full data of videos like myself while testing it.

Kali Linux NetHunter

[wifite2 demo]

current wifi capabilities with only the onboard chip
  • A plethora of WEP attacks
  • WPA Handshake Capture and offline crack
  • WPA PMKID Hash Capture and offline crake
  • WPS Brute-Force PIN attack
  • WPS offline Pixie-Dust attack
  • WPS offline NULL PIN attack
Viewing the phone horizontally is a must, I usually use a little blue tooth keyboard.
with on the go cable and second ap
with an anker adapter and another AP we have a remote implant, an extra battery can be paired for extra life; and of course a stand on the coffee table may not be ideal
  • WIFI signal jamming [additional antenna via usb needed]
  • Implant and use all the tools with remote access over ssh

In this accelerated screen recording wifite is enabled by disconnecting from any networks, switching the firmware and then starting the program on interface wlan0 (index 0 the first WiFi adapter, the onboard WiFi chip. Wifite automatically scanning for a few seconds capturing a list around 150 potential targets, then Initialize an attack against against a personal WiFi network I started for the purpose.

Lets improve it. What’s?
better than ssh: Mosh
Easier to type on: iPad
Rubber Ducky’s?
Rucky disables screenshots and any recording during use so these images are borrowed from: https://store.nethunter.com/en/
pss1
pss2
pss3
pss4
pss5
pss6
pss7
previous arrow
next arrow

With all the fantastic work on Rucky I couldn’t leave they/them out.

The source code: https://github.com/mayankmetha/Rucky

You can download Rucky directly from the NetHunter app store. Of course this is all FOSS. You can download the NetHunter app store from :

https://store.nethunter.com/en/

And conveniently check the pgp signature via QR code to when downloading before install. Rucky does require root and a USB HID patch for use.

with the lovely color scheme on my device


At https://ducktoolkit.com/ on your phone or any browser you can select from an array of payloads based upon your target, encode the payload, disguise the signatures on your device and load it straight into the app, Rucky. These tools are almost getting easy to use but the barrier of the difficulty to getting this setup in the first place and customizing/configuring it for use seems to still be keeping at bay hoards of teenagers who might otherwise in their lack of experience attempt to use them nefariously.

pss1
pss2
pss3
pss4
pss5
pss6
pss7
previous arrow
next arrow