Browse Source

fix: unboxed the tar.gz, let the folder be open

pull/2748/merge
KostLinux 2 weeks ago committed by Zouhair AMAZZAL
parent
commit
bde2b1be3e
  1. 11
      employment-tasks/devops/notbad-task/README.md
  2. 1
      employment-tasks/devops/notbad-task/keycloak/.gitignore
  3. 6
      employment-tasks/devops/notbad-task/keycloak/README.md
  4. 8
      employment-tasks/devops/notbad-task/keycloak/keycloak.sh

11
employment-tasks/devops/notbad-task/README.md

@ -16,16 +16,7 @@ You need at least:
## The tasks
1) We have a Terraform securitygroups.tf file. Every time Terraform runs, it says the security group in that file will be updated in place. Find a way to prevent this.
2) Get the keycloak-test.tar.gz archive. What we can improve?
**2.1 Pull the archive from S3 bucket via `wget`**
```bash
wget https://lookinlabs-contribution-data.s3.eu-west-1.amazonaws.com/keycloak-test.tar.gz
```
**2.2 Find what can be improved in `keycloak-test.tar.gz`**
2) Look into keycloak folder. What can be improved?
3) Provide infrastructure and create CI/CD with a web app that will listen to 8089 port and return "ReallyNotBad" string when POST request contains header "NotBad" with value "true", eg. `curl -X POST -H "NotBad: true" https://someurl:8089/` should return "ReallyNotBad".
Use any technology you want to deploy the application to AWS. It can be Ansible, Terraform, etc. or a combination of some of them.

1
employment-tasks/devops/notbad-task/keycloak/.gitignore diff.vendored

@ -0,0 +1 @@
.env

6
employment-tasks/devops/notbad-task/keycloak/README.md

@ -0,0 +1,6 @@
# alpeso-test
alpeso-test
## How-to use
Simple run ```./keycloack.sh test test1``` where test = keycloak user id and test1 = keycloak client secret.

8
employment-tasks/devops/notbad-task/keycloak/keycloak.sh

@ -0,0 +1,8 @@
#!/bin/bash
CLIENTID=$1
CLIENTSECRET=$2
TOKEN=$(curl -k -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Basic $(echo -n ${CLIENTID}:${CLIENTSECRET} | base64 )" --data "grant_type=client_credentials" "http://mydomain.com/auth/realms/myrealm/protocol/openid-connect/token" -s | jq -r .access_token)
echo $TOKEN
Loading…
Cancel
Save