Skip to content

Instantly share code, notes, and snippets.

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

Charles Moulliard cmoulliard

🏠
Working from home
View GitHub Profile
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.4.72-v7l+ (dom@buildbot) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #1356 SMP Thu Oct 22 13:57:51 BST 2020
[ 0.000000] CPU: ARMv7 Processor [410fd083] revision 3 (ARMv7), cr=30c5383d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[ 0.000000] OF: fdt: Machine model: Raspberry Pi 4 Model B Rev 1.2
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000001ec00000, size 256 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] On node 0 totalpages: 1012736
@cmoulliard
cmoulliard / kind-reg-ingress.sh
Last active October 22, 2020 08:51
Bash script to create a kind + container registry + ingress cluster
#!/bin/sh
set -o errexit
TO_BE_DELETED=${1:-false}
CLUSTER_NAME=${2:-devcluster}
REG_NAME='kind-registry'
# Delete clusterif requested
if [ "$TO_BE_DELETED" = true ] ; then
kind delete clusters ${CLUSTER_NAME}
docker run -e JIRA_USERNAME=test -e JIRA_PASSWORD=test -e GITHUB_TOKEN=test -e JIRA_USERS=TEST --rm cmoulliard/snowdrop-bot:0.1-SNAPSHOT
exec java -Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager -javaagent:/opt/agent-bond/agent-bond.jar=jmx_exporter{{9779:/opt/agent-bond/jmx_exporter_config.yml}} -XX:+ExitOnOutOfMemoryError -cp . -jar /deployments/app.jar
__ ____ __ _____ ___ __ ____ ______
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2020-07-16 08:20:10,848 INFO [io.agr.pool] (main) Datasource '<default>': Initial size smaller than min. Connections will be created when necessary
org.h2.message.DbException: Log file error: "/z/var/snowdrop-bot/data/prod/snowdrop-bot/db/bot.db.trace.db", cause: "org.h2.message.DbException: Error while creating file ""/z"" [90062-197]" [90034-197]
org.h2.message.DbException: Log file error: "/z/var/snowdrop-bot/data/prod/snowdrop-bot/db/bot.db
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< io.snowdrop:snowdrop-bot >----------------------
[INFO] Building snowdrop-bot 0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ snowdrop-bot ---
[INFO] io.snowdrop:snowdrop-bot:jar:0.1-SNAPSHOT
[INFO] +- io.quarkus:quarkus-resteasy:jar:1.6.0.Final:compile
[INFO] | +- io.quarkus:quarkus-vertx-http:jar:1.6.0.Final:compile
kc logs -n bot snowdrop-bot-654c9ffc55-bxqnd
exec java -Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager -javaagent:/opt/agent-bond/agent-bond.jar=jmx_exporter{{9779:/opt/agent-bond/jmx_exporter_config.yml}} -XX:+ExitOnOutOfMemoryError -cp . -jar /deployments/app.jar
__ ____ __ _____ ___ __ ____ ______
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2020-07-16 07:33:12,686 INFO [io.agr.pool] (main) Datasource '<default>': Initial size smaller than min. Connections will be created when necessary
2020-07-16 07:33:14,012 INFO [io.sma.rea.mes.provider] (main) SRMSG00208: Deployment done... start processing
2020-07-16 07:33:14,020 INFO [io.sma.rea.mes.provider] (main) SRMSG00226: Found incoming connectors: []
2020-07-16 07:33:14,021 INFO [io.sma.rea.mes.provider] (main) SRMSG00227: Found outgoing connectors: []
./mvnw clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.group=cmoulliard -Pdocker
docker push cmoulliard/snowdrop-bot
kc delete -n bot -f target/kubernetes/kubernetes.yml -n bot
kc apply -n bot -f target/kubernetes/kubernetes.yml -n bot
kc scale --replicas=0 deployment.apps/snowdrop-bot -n bot
kc scale --replicas=1 deployment.apps/snowdrop-bot -n bot
export GITHUB_TOKEN=`pass show snowdrop/github.com/snowdrop-bot/token`
export jira_users=cmoulliard
---
apiVersion: "v1"
kind: "ServiceAccount"
metadata:
annotations:
app.quarkus.io/vcs-url: "https://github.com/snowdrop-bot/snowdrop-bot.git"
app.quarkus.io/build-timestamp: "2020-07-15 - 13:40:50 +0000"
app.quarkus.io/commit-id: "4d2157c00d5e282ad3d254b49ea3233a77e17bfe"
labels:
app.kubernetes.io/name: "snowdrop-bot"

task calle

- name: Show the URL of the tagged release
  debug: msg="Accessing the tagged release at {{ github_api }}/{{ github_owner }}/{{ github_repo }}/releases/tags/{{ github_tag }}"
  when: github_tag != ""

- name: Get the tagged release
  uri:
    url: "{{ github_api }}/{{ github_owner }}/{{ github_repo }}/releases/tags/{{ github_tag }}"

Using hosts

[dabou]
127.0.0.1

Result

ansible dabou -m ping -vvv
TASK [redhat.jcliff.jcliff : Collect Supported Operating Systems] ******************************************************************************************************************************************************************
task path: /Users/cmoullia/.ansible/collections/ansible_collections/redhat/jcliff/roles/jcliff/tasks/main.yml:3
ok: [localhost] => (item={'key': 'rpm', 'value': ['Fedora', 'CentOS', 'RedHat']}) => {
"ansible_facts": {
"jcliff_install_supported_os": [
"Fedora",
"CentOS",
"RedHat"
]
},