Spickzettel

Mein persönlicher Spickzettel: so Zeugs, das ich immer wieder vergesse…

OpenShift

create and switch projects:

oc new-project thespark
oc projects
oc project thespark

list, describe and delete all resources with a label:

oc get all --selector app=hallospark -o yaml
oc describe all --selector app=hallospark
oc delete all --selector app=hallospark 

describe etc. resource types, print to yaml

oc describe bc
oc describe dc
oc get secret gitlab-hallospark -o yaml

templates

oc get templates -n openshift 
oc describe template postgresql-persistent -n openshift
oc get template jenkins-pipeline-example -n openshift -o yaml
oc export all --as-template=javapg

s2i maven “binary workflow”

mvn package fabric8:resource fabric8:build fabric8:deploy

s2i “source workflow” for different languages:

oc new-app fabric8/s2i-java~https://github.com/rschumm/hallospark.git
oc new-app fabric8/s2i-java~https://gitlab.com/rschumm/hallospark.git --source-secret='gitlab-hallospark'
oc new-app openshift/php~https://github.com/rschumm/hallophp.git
oc new-app openshift/dotnet~https://github.com/rschumm/hallodotnet.git

apply a resource

oc apply -f src/main/fabric8/pipeline_bc.yml 

minishift, eclipse che addon etc.

minishift addons apply che
minishift addons list
minishift update 

Zugriff von Aussen auf die Datenbank etc. (Routes in OpenShift sind nur für HTTP):

rschumm@kassandra:~/git/schufi$ oc port-forward postgresql-1-6pkns 15432:5432

SQL

ALTER USER find
	SUPERUSER

Linux

rpm on ubuntu:

alien -i bla.rpm

distribution:

cat /etc/*release*

Java

shebang support

#!/usr/bin/java --source 11
public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hallo Java shebang");
    }
}

DotNet

create new application:

dotnet new web 
dotnet build 
dotnet run 

spick


zurück zum Seitenanfang