https://github.com/sysdiglabs/se-workshop
SE workshop
https://github.com/sysdiglabs/se-workshop
Last synced: 6 months ago
JSON representation
SE workshop
- Host: GitHub
- URL: https://github.com/sysdiglabs/se-workshop
- Owner: sysdiglabs
- Created: 2020-02-06T10:17:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-24T10:18:10.000Z (almost 4 years ago)
- Last Synced: 2023-03-02T17:22:42.416Z (about 2 years ago)
- Language: Python
- Size: 25.4 KB
- Stars: 2
- Watchers: 4
- Forks: 18
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# se-workshop
SE workshop## Code snippets
You might need these snippets during the workshop, so they are provided here so you can Copy & Paste
### Demoenv handling commands
```
alias demoenv-aws="docker run -ti --rm \
-v ~/.ssh/id_rsa:/config/ssh-key.pem:ro \
-v ~/.aws:/config/aws \
-e CLUSTER_NAME=\
-e BUCKET_PATH=s3://sysdig-partner-demo-env/ \
-e ZONE=us-east-1a \
-e NUM_NODES=1 \
-e VPC_ID=vpc-04bcfe02f0e598f57 \
-e PRIVATE_SUBNET_ID=subnet-0b47480ea22274a71 \
-e PUBLIC_SUBNET_ID=subnet-0d7c808f36dfb0f08 \
845151661675.dkr.ecr.us-east-1.amazonaws.com/demoenv-aws"
```### Helm command for agent installation
```
kubectl create ns sysdig-agenthelm install -n sysdig-agent --set sysdig.accessKey=YOUR-KEY-HERE --set sysdig.settings.k8s_cluster_name=foo-bar sysdig-agent stable/sysdig
```### Deploying Jenkins
```
#Linux
$ curl -sSfL https://github.com/roboll/helmfile/releases/download/v0.98.3/helmfile_linux_amd64 -o /usr/local/bin/helmfile#Mac
$ curl -sSfL https://github.com/roboll/helmfile/releases/download/v0.98.3/helmfile_darwin_amd64 -o /usr/local/bin/helmfile$ chmod +x /usr/local/bin/helmfile
$ helmfile sync --concurrency 1
```
Get Jenkins password
```
$ kubectl get secret --namespace jenkins jenkins -o jsonpath="{.data.jenkins-admin-password}" | base64 --decode
```Export Jenkins service localhost using port-forward
```
kubectl -n jenkins port-forward svc/jenkins 8080
```### Github action workflow
```
name: Sysdig - Build, scan and push Docker Imageon: [push, repository_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1- name: Build the Docker image
run: docker build . --file Dockerfile --tag sysdigworkshop/:latest- name: Scan image
uses: sysdiglabs/scan-action@v1
with:
image-tag: "sysdigworkshop/"
sysdig-secure-token: ${{ secrets.SYSDIG_SECURE_TOKEN }}```