Skip to content

Instantly share code, notes, and snippets.

View EugenMayer's full-sized avatar
🏠
Working from home

Eugen Mayer EugenMayer

🏠
Working from home
View GitHub Profile
@EugenMayer
EugenMayer / lsb-release.rb
Created February 21, 2021 19:53
lsb-release.rb
ohai 'lsb-ohai-releoad' do
plugin 'lsb'
action :nothing
end
log "pre lsb release name: #{node['lsb']['codename']}" do
level :error
end
package %w[lsb-release] do
version: '3'
services:
app:
image: atlassian/confluence-server:6.13.13
ports:
- '80:8090'
- '8091:8091'
- '5005:5005'
depends_on:
- db

Configuration

Caution

When you change anything in your docker-sync.yml be sure to run docker-sync clean and docker-sync start right after it. Just running docker-sync start or stop will not recreate the container and your changes will have no effect!

docker-sync.yml

# prepare
Login on your docker-host and store the file `~/fioconfig.fio` with the content above
Now run those 2 tests
# NFS test
```
fio ~/fioconfig.fio --filenanme /path/to/nfs/mount/somerandomefile
```
@EugenMayer
EugenMayer / io test
Last active September 7, 2019 05:25
io test
# we no longer use /tmp sinc it is a tmpfs / in memory
mkdir ~/tmp
cd ~/tmp
sysbench --file-fsync-freq=1 --num-threads=16 --test=fileio --file-total-size=1G --file-test-mode=rndrw --file-rw-ratio=2 cleanup > /dev/null
sysbench --file-fsync-freq=1 --num-threads=16 --test=fileio --file-total-size=1G --file-test-mode=rndrw --file-rw-ratio=2 prepare > /dev/null
sysbench --file-fsync-freq=1 --num-threads=16 --test=fileio --file-total-size=1G --file-test-mode=rndrw --file-rw-ratio=2 run
# when you are done testing
#!/bin/bash
echo "removing current jenv java's to readd them freshly"
jenv versions --bare | xargs -n1 jenv remove
echo "adding all sdkmans java versions to jenv"
find $HOME/.sdkman/candidates/java -type d -maxdepth 1 -mindepth 1 -exec jenv add '{}' \;
@EugenMayer
EugenMayer / 00-docker-shorewall.md
Created February 24, 2019 21:46 — forked from lukasnellen/00-docker-shorewall.md
setup shorewall for docker networking beyond the default bridge network, e.g., for docker-compose

Docker(-compose) with shorewall

The shorewall documentation explains in http://shorewall.org/Docker.html how to configure shorewall for use with docker. The problem with the configuration is that it only allows connections from the host to the main bridge docker0. Connections to other networks on dynamically created bridges, with names starting by default with br-, is blocked. Instead of the recommended contents of /etc/shorewall/interfaces, use wild-card interface names as follows:

#ZONE	INTERFACE	OPTIONS
#dock	docker0		bridge     # disabled default recommendation
dock 	docker0		physical=docker+,routeback=1
dock 	br		physical=br-+,routeback=1
#!/bin/bash
curl -X GET -O -v 'https://maven.atlassian.com/content/repositories/atlassian-public/com/atlassian/labs/plugins/quickreload/1.24.1/quickreload-1.24.1.jar'
echo 'Installing Quick Reload from local JAR.'
url="http://admin:admin@localhost/rest/plugins/1.0/";
token=$(curl -sI -H "Accept: application/vnd.atl.plugins.installed+json" "$url?os_authType=basic" | grep upm-token | cut -d: -f2- | tr -d '[[:space:]]');
curl -X POST -v -F plugin=@./quickreload-1.24.1.jar "$url?token=$token"
sleep 5
curl -X GET -O -v 'https://maven.atlassian.com/content/repositories/atlassian-public/com/atlassian/labs/plugins/quickreload/1.24.1/quickreload-1.24.1.jar'
echo 'Installing Quick Reload from local JAR.'
url="http://admin:admin@localhost/rest/plugins/1.0/";
token=$(curl -sI -H "Accept: application/vnd.atl.plugins.installed+json" "$url?os_authType=basic" | grep upm-token | cut -d: -f2- | tr -d '[[:space:]]');
curl -X POST -v -F plugin=@./quickreload-1.24.1.jar "$url?token=$token"
sleep 5
# install our plugin
upstream fpm {
server drupal:9000;
}
map $http_cookie $consent_check {
default "";
"~*CONSENT=(?<token>.+)" "token";
}
server {