Skip to content

Instantly share code, notes, and snippets.

View martin-g's full-sized avatar
🏠
Working from home

Martin Grigorov martin-g

🏠
Working from home
View GitHub Profile
#!/usr/bin/env bash
DRIVER_CORES=1
DRIVER_MEM=2048m
EXECUTOR_INSTANCES=3
EXECUTOR_CORES=2
EXECUTOR_MEM=2048m
SPARK_HOME="$HOME/spark/spark-3.2.1-bin-hadoop3.2"
PATH="$JAVA_8_HOME/bin:$SPARK_HOME/bin:$PATH"
@martin-g
martin-g / kind-cluster.yaml
Created March 15, 2022 09:24
Kubernetes description for creating Kind cluster
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: my-kind-cluster-name
nodes:
- role: control-plane
- role: worker
#!/bin/bash
set -eu
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
export fly_target=${fly_target:-tutorial}
echo "Concourse API target ${fly_target}"
echo "Tutorial $(basename $DIR)"
pushd $DIR
@martin-g
martin-g / concourse-basic-pipeline.yml
Created January 20, 2021 09:40
A ConcourseCI pipeline definition that runs the hello-world task only on worker nodes tagged with 'arm64'
---
jobs:
- name: job-hello-world
public: true
plan:
- task: hello-world
tags: [arm64]
config:
platform: linux
image_resource:
---
platform: linux
image_resource:
type: registry-image
source:
repository: arm64v8/busybox
tag: latest
run:
@martin-g
martin-g / concourse-worker-node.fish
Last active January 20, 2021 11:37
Fish shell script that starts concourse-arm-worker Docker container
#!/usr/bin/fish
docker run \
-it \
--rm \
--privileged \
-p 7777:7777 \
-p 7788:7788 \
-p 8888:8888 \
-v /home/ubuntu/devel/concourse-work-dir:/concourse \
version: '3'
services:
concourse-db:
image: postgres
ports: ["5432:5432"]
environment:
POSTGRES_DB: concourse
POSTGRES_USER: concourse_user
POSTGRES_PASSWORD: concourse_pass
@martin-g
martin-g / web-node.fish
Created January 20, 2021 08:51
Fish shell script to start ConcourseCI web node
#!/usr/bin/env fish
set -x CONCOURSE_POSTGRES_HOST localhost
set -x CONCOURSE_POSTGRES_USER concourse_user
set -x CONCOURSE_POSTGRES_PASSWORD concourse_pass
set -x CONCOURSE_POSTGRES_DATABASE concourse
set -x CONCOURSE_EXTERNAL_URL http://web-node:8080
set -x CONCOURSE_X_FRAME_OPTIONS deny
set -x CONCOURSE_ADD_LOCAL_USER user:password
set -x CONCOURSE_MAIN_TEAM_LOCAL_USER user
./build.sh
+ set -e
+ docker build --build-arg http_proxy --build-arg https_proxy -t registry-image . -f Dockerfile-registry-image
Sending build context to Docker daemon 21.79MB
Step 1/15 : FROM golang:1.14.3-alpine3.11 as builder
---> 6bf3dc21cd79
Step 2/15 : RUN apk add git
---> Using cache
---> f7e0eca88239
Step 3/15 : RUN git clone https://github.com/concourse/registry-image-resource.git /src/registry-image-resource
Versions:
- GRAALVM Community Edition 20.2.0 (build 11.0.8+10-jvmci-20.2-b03)
- GRAALVM Enterprice Edition 20.2.1 (build 11.0.9+7-LTS-jvmci-20.2-b05)
- OpenJDK 15 (build 15+36-1562, mixed mode, sharing)
===================================================================================================================
I I Native image CE I OpenJDK 15 I GRAAL_CE_JVM I GRAAL_EE_JVM I Native Image EE I
I----------------I--------------------I--------------------I---------------------I--------------I-----------------I
I I x86_64 | aarch64 I x86_64 | aarch64 I x86_64 | aarch64 I x86_64 I x86_64 I