Skip to content

Instantly share code, notes, and snippets.

Avatar
🏃‍♂️ ⌨️ 🎧 📖 🍺 🥃 🔁

Bartosz Majsak bartoszmajsak

🏃‍♂️ ⌨️ 🎧 📖 🍺 🥃 🔁
View GitHub Profile
@bartoszmajsak
bartoszmajsak / microk8s_setup.sh
Last active Jul 17, 2020 — forked from caglar10ur/microk8s
microk8s setup with istio
View microk8s_setup.sh
snap install microk8s --classic
sudo ufw default allow routed
sudo iptables -P FORWARD ACCEPT
## Fedora specific fix - see https://github.com/ubuntu/microk8s/issues/408#issuecomment-581100625
sudo firewall-cmd --zone=trusted --add-masquerade --permanent
sudo firewall-cmd --zone=trusted --add-interface=cni0 --permanent
sudo firewall-cmd --reload
microk8s.enable dns dashboard metrics-server
View gist:81229a53d8c60c68e8c98b070a21bf08
cni0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
inet 10.1.24.1 netmask 255.255.255.0 broadcast 0.0.0.0
inet6 fe80::4ad:97ff:fe65:10d3 prefixlen 64 scopeid 0x20<link>
ether 06:ad:97:65:10:d3 txqueuelen 1000 (Ethernet)
RX packets 42225 bytes 3227090 (3.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 49341 bytes 26388023 (25.1 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
crc: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
View canti.java
//usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS io.github.bonigarcia:webdrivermanager:3.8.1
//DEPS org.seleniumhq.selenium:selenium-java:3.141.59
//DEPS org.slf4j:slf4j-simple:1.7.30
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.*;
import org.openqa.selenium.chrome.*;
import io.github.bonigarcia.wdm.WebDriverManager;
View gist:242a214e549aec49fa153cb7607b7f61
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project arquillian-test-spi: Unabl
e to generate classpath: org.apache.maven.artifact.resolver.ArtifactResolutionException: Unable to get dependency information for org.apache.m
aven.surefire:surefire-junit4:jar:2.22.2: Failed to process POM for org.apache.maven.surefire:surefire-junit4:jar:2.22.2: Non-resolvable paren
t POM for org.apache.maven.surefire:surefire-junit4:2.22.2: Could not find artifact org.apache.maven.surefire:surefire-providers:pom:2.22.2 in
jboss-public-repository (https://repository.jboss.org/nexus/content/groups/public/)
[ERROR] org.apache.maven.surefire:surefire-junit4:jar:2.22.2
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] jboss-public-repository (https://repository.jboss.org/nexus/content/groups/public/, releases=true, snapshots=false),
[ERROR] central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)
View call_sequence
╭─ bartek@hydrobook  …/github.com/maistra/debugging-workshop  33ff8c1b  location_fix ● ↑1   SIGINT(2) ↵  11:06:32
╰─ curl http://istio-ingressgateway-istio-system.apps.cluster-53f5.53f5.example.opentlc.com/staging-project2/api/products
[ {
"itemId" : "329299",
"name" : "Red Fedora",
"description" : "Official Red Hat Fedora",
"price" : 34.99,
"availability" : {
View gist:b47af9679d1afe4f16f3d5128ac0a577
2020-02-04T15:08:29.940325Z info Starting IOR version.BuildInfo{Version:"development", GitRevision:"e1ed528e47dce40674da511aa5e88121907d3c3b", BuildStatus:"Modified", GitTag:"maistra-1.0.5-8-ge1ed528"}
2020-02-04T15:08:29.940363Z info Started IOR with
McpAddr: mcp://istio-galley:9901
Namespace: istio-system
2020-02-04T15:08:29.940377Z info parsed scheme: ""
2020-02-04T15:08:29.940386Z info scheme "" not registered, fallback to default scheme
2020-02-04T15:08:29.940398Z info ccResolverWrapper: sending update to cc: {[{istio-galley:9901 0 <nil>}] <nil>}
2020-02-04T15:08:29.940402Z info ClientConn switching balancer to "pick_first"
2020-02-04T15:08:29.940879Z info pickfirstBalancer: HandleSubConnStateChange: 0xc000096060, CONNECTING
View drs.yaml
apiVersion: v1
items:
- apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"networking.istio.io/v1alpha3","kind":"DestinationRule","metadata":{"annotations":{},"creationTimestamp":null,"name":"productpage","namespace":"ike-ior-test"},"spec":{"host":"productpage","subsets":[{"labels":{"version":"v1"},"name":"v1"}]}}
creationTimestamp: "2020-02-05T12:43:22Z"
generation: 1
@bartoszmajsak
bartoszmajsak / App setup
Last active Jan 29, 2020
CRC installation
View App setup
[source,bash]
----
oc new-project ike-test
oc adm policy add-scc-to-user anyuid -z default -n $(oc project -q)
oc adm policy add-scc-to-user privileged -z default -n $(oc project -q)
docker login -u kubeadmin -p $(oc whoami -t) default-route-openshift-image-registry.apps-crc.testing
IKE_DOCKER_REGISTRY=default-route-openshift-image-registry.apps-crc.testing \
IKE_DOCKER_REPOSITORY=$(oc project -q) \
IKE_IMAGE_TAG=latest TEST_NAMESPACE=$(oc project -q) \
View gist:79b04dd3f79a5af63e5edb91b781ef29
diff --git a/Gopkg.lock b/Gopkg.lock
index b2461e5..577e8ab 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -66,12 +66,12 @@
version = "v2.11.1"
[[projects]]
- digest = "1:448bf60e9dce6d5fd9dfa8fd9eb9a23163424ff4e4f142456405781e942e3998"
+ digest = "1:ed5a8df9a9f0d237764c25da704f095cbd108271c1168cb7866e3e78577110c4"
View gist:b2046a02ae8af429bb1266b3b48ee785
Checking required tools
'dep golangci-lint goimports ginkgo go-bindata' are installed
Fetching dependencies
dep ensure -v
Formatting code