Tips for running a single-node Kubernetes cluster on WSL2 with Podman
-
Edit
/etc/containers/containers.conf
:- Set
cgroup_manager
tocgroupfs
- Set
- Set
events_logger
tofile
// Please find the full, tested version in | |
// https://github.com/influxdata/influxdb_iox/blob/fe155e15fb2ad166aee66b0458e63c24a8128dd4/query/src/exec/task.rs#L101-L118 | |
pub struct DedicatedExecutor { | |
state: Arc<Mutex<State>>, | |
} | |
/// Runs futures (and any `tasks` that are `tokio::task::spawned` by | |
/// them) on a separate Tokio Executor | |
struct State { |
#![allow(unused)] // silence unused warnings while exploring (to comment out) | |
use std::{error::Error, str}; | |
use s3::bucket::Bucket; | |
use s3::creds::Credentials; | |
use s3::region::Region; | |
use s3::BucketConfiguration; | |
// Youtube Walkthrough - https://youtu.be/uQKBW8ZgYB8 |
Tips for running a single-node Kubernetes cluster on WSL2 with Podman
Edit /etc/containers/containers.conf
:
cgroup_manager
to cgroupfs
events_logger
to file
# eks.yml | |
on: | |
pull_request: | |
push: | |
branches: # array of glob patterns matching against refs/heads. Optional; defaults to all | |
- master # triggers on pushes that contain changes in master | |
name: Build and Deploy to EKS | |
env: |
For a performance comparison of EBS-SSD vs instance store, see: https://gist.github.com/ktheory/3c3616fca42a3716346b
See: https://aws.amazon.com/ec2/pricing/on-demand/ (Pricing from 20190721)
Docs: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html
m5a.large 2 N/A 8 GiB EBS Only $0.086 per Hour
#!/usr/bin/env bash | |
# Example: | |
# ./find-ecr-image.sh foo/bar mytag | |
if [[ $# -lt 2 ]]; then | |
echo "Usage: $( basename $0 ) <repository-name> <image-tag>" | |
exit 1 | |
fi | |
IMAGE_META="$( aws ecr describe-images --repository-name=$1 --image-ids=imageTag=$2 2> /dev/null )" |
This gist consists of 4 files:
throttler.py - Throttler class implementation
asyncio_throttling_example.py - Throttling general coroutines
aiohttp_throttling_example_client.py - Throttling aiohttp requests
aiohttp_throttling_example_server.py - Web server for testing aiohttp_throttling_example_client.py
#!/usr/bin/env python3.6 | |
import asyncio | |
from contextlib import closing | |
import aiohttp | |
import tqdm | |
async def download(session, url, progress_queue): |
import org.sonatype.nexus.common.entity.* | |
import org.sonatype.nexus.security.* | |
import org.sonatype.nexus.security.authz.* | |
import org.sonatype.nexus.selector.* | |
import com.google.common.collect.ImmutableMap | |
// use container.lookup to fetch internal APIs we need to use | |
def selectorManager = container.lookup(SelectorManager.class.name) | |
def securitySystem = container.lookup(SecuritySystem.class.name) |
import subprocess | |
import argparse | |
import re | |
import sys | |
import requests | |
def do_dig(domain): | |
command = "dig {} | grep IN".format(domain) | |
try: | |
output = subprocess.check_output(command, shell=True, stdin=subprocess.PIPE, stderr=subprocess.STDOUT) |