https://github.com/binliuk/tekton-pipeline-with-golang-https-server
Simple tekon pipeline to build and deploy hello openshift https server in Openshift 4.x
https://github.com/binliuk/tekton-pipeline-with-golang-https-server
golang https https-server openshift-4x pipeline tekon
Last synced: 2 days ago
JSON representation
Simple tekon pipeline to build and deploy hello openshift https server in Openshift 4.x
- Host: GitHub
- URL: https://github.com/binliuk/tekton-pipeline-with-golang-https-server
- Owner: binliuk
- License: cc0-1.0
- Created: 2020-03-15T15:20:25.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-25T19:12:33.000Z (over 5 years ago)
- Last Synced: 2024-06-19T04:05:59.790Z (over 1 year ago)
- Topics: golang, https, https-server, openshift-4x, pipeline, tekon
- Language: Go
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Create Tekon pipeline with a simple goland https server in Openshift 4.x
---
#### prerequirements — `tekton operater and command line`
```Tekton operator and cli
see ref: https://openshift.github.io/pipelines-docs/docs/0.10.5/assembly_installing-pipelines.html
```
#### Create project in ocp4 - `go-https-pipeline`
```sh
#New project:
oc new-project go-https-pipeline
#Check tekon Service account:
oc get sa pipeline
```
#### Tekton resources — `image and git`
```Tekton and oc
oc create -f https://raw.githubusercontent.com/binliuk/tekton-pipeline-with-golang-https-server/master/pipeline/resource.yaml
tkn resource ls
```
#### Tekton tasks — `deploy and customization`
```Tekton
oc create -f https://raw.githubusercontent.com/binliuk/tekton-pipeline-with-golang-https-server/master/pipeline/apply_manifest_task.yaml
oc create -f https://raw.githubusercontent.com/binliuk/tekton-pipeline-with-golang-https-server/master/pipeline/update_deployment_task.yaml
tkn task ls
```
#### Tekton pipeline — `build and deploy`
```Tekton
oc create -f https://raw.githubusercontent.com/binliuk/tekton-pipeline-with-golang-https-server/master/pipeline/pipeline.yaml
tkn pipeline ls
```
#### Trigger pipeline from cli
```bash
#trigger
tkn pipeline start build-and-deploy
#track logs
tkn pipelinerun logs -f -n pipelines-tutorial
#retrigger pipeline
tkn pipeline start build-and-deploy --last
```
##### Generate private key (.key)
```sh
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" (X25519 || ≥ secp384r1)
# https://safecurves.cr.yp.to/
# List ECDSA the supported curves (openssl ecparam -list_curves)
openssl ecparam -genkey -name secp384r1 -out server.key
```
##### Generation of self-signed(x509) public key (PEM-encodings `.pem`|`.crt`) based on the private (`.key`)
```sh
openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650
```
Reference Link
---
* https://getgophish.com/blog/post/2018-12-02-building-web-servers-in-go/
* https://github.com/openshift-pipelines
* https://github.com/openshift/pipelines-tutorial
* https://openshift.github.io/pipelines-docs/docs/0.10.5/assembly_installing-pipelines.html
* https://github.com/denji/golang-tls
* …