Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
3116cd0
Add minikube tests
carlosthe19916 Mar 19, 2021
75571f1
add minikube
carlosthe19916 Mar 19, 2021
3a47f57
fix timeouts
carlosthe19916 Mar 19, 2021
7bad1eb
Fix wait
carlosthe19916 Mar 19, 2021
b742f4c
Add echo
carlosthe19916 Mar 19, 2021
46cd09f
Add addons ingress
carlosthe19916 Mar 19, 2021
5a5e1ab
ingress fix
carlosthe19916 Mar 19, 2021
db19913
Second fix
carlosthe19916 Mar 19, 2021
e5ccb6a
CHange versions
carlosthe19916 Mar 19, 2021
4043b9c
Verify minikube
carlosthe19916 Mar 19, 2021
95782e0
change laptop vers
carlosthe19916 Mar 19, 2021
1d4361c
change driver
carlosthe19916 Mar 19, 2021
6d5bf22
Change order
carlosthe19916 Mar 19, 2021
7dd8703
custom bash
carlosthe19916 Mar 19, 2021
30f279f
Test env
carlosthe19916 Mar 19, 2021
e47fa9a
test yarn
carlosthe19916 Mar 19, 2021
28a74a7
Add ok
carlosthe19916 Mar 19, 2021
ef90114
Set keycloak env
carlosthe19916 Mar 19, 2021
c1f9825
x
carlosthe19916 Mar 19, 2021
8936f27
s
carlosthe19916 Mar 19, 2021
5e876fd
fix e2e tests
carlosthe19916 Mar 22, 2021
ce1f94c
Merge branch 'main' into minikube
carlosthe19916 Apr 7, 2021
1eddb42
Add pathfinder
carlosthe19916 Apr 7, 2021
b2c7358
Test minikube
carlosthe19916 Apr 7, 2021
bfb91d2
Add pathfinder to the ingress
carlosthe19916 Apr 7, 2021
471d488
Add pathfinder
carlosthe19916 Apr 7, 2021
53ea92c
Format script
carlosthe19916 Apr 7, 2021
1dfae1c
Build
carlosthe19916 Apr 7, 2021
a7e2988
change driver
carlosthe19916 Apr 7, 2021
2430d20
Change minikube version
carlosthe19916 Apr 7, 2021
e6088bf
Restore actions
carlosthe19916 Apr 7, 2021
298bd2c
test only containers
carlosthe19916 Apr 8, 2021
007c416
remove minikube branch from CI
carlosthe19916 Apr 8, 2021
905b14c
Run minikube
carlosthe19916 Apr 8, 2021
2e8c5c3
Remove local proxy setup
carlosthe19916 Apr 8, 2021
86dba2c
Fix endpoints
carlosthe19916 Apr 8, 2021
6c1cf0a
Add yarn install
carlosthe19916 Apr 8, 2021
23974d1
Merge branch 'minikube' into main
carlosthe19916 Apr 8, 2021
75812b6
Remove minikube branch
carlosthe19916 Apr 8, 2021
0ef21ea
Remove inputs
carlosthe19916 Apr 8, 2021
5134efc
Change file name
carlosthe19916 Apr 8, 2021
e098dce
Merge branch 'main' into minikube
carlosthe19916 May 20, 2021
9212760
Use tackle-ui-tests
carlosthe19916 May 20, 2021
e178a2c
add env variables
carlosthe19916 May 20, 2021
55f3b76
Remove firefox tests temporarily
carlosthe19916 May 21, 2021
db1a3af
Remove firefox from minikube running tests
carlosthe19916 May 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 0 additions & 140 deletions .github/workflows/ci-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,143 +186,3 @@ jobs:
snapshot: false
tags: "main"
buildoptions: "--pull"

test-container-images:
needs: [container-images]
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
browser: [chrome, firefox]
services:
keycloak:
image: quay.io/keycloak/keycloak:12.0.2
ports:
- 8180:8080
env:
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: admin
options: >-
--health-cmd "curl --fail http://localhost:8080/auth || exit 1"
--health-interval 10s
--health-timeout 5s
--health-retries 5
controls-db:
image: postgres:13.1
ports:
- 5433:5432
env:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: controls_db
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
application-inventory-db:
image: postgres:13.1
ports:
- 5434:5432
env:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: application_inventory_db
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
pathfinder-db:
image: postgres:13.1
ports:
- 5435:5432
env:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: pathfinder_db
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Keycloak Admin CLI
uses: carlosthe19916/keycloak-action@0.4
with:
server: http://keycloak:8080/auth
username: admin
password: admin
kcadm: create realms -f konveyor-realm.json
- name: Controls API
run: |
docker run -d --name controls --network ${{ job.services.controls-db.network }} --network-alias controls -p 8081:8080 \
-e QUARKUS_HTTP_PORT=8080 \
-e QUARKUS_DATASOURCE_USERNAME=user \
-e QUARKUS_DATASOURCE_PASSWORD=password \
-e QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://controls-db:5432/controls_db \
-e QUARKUS_OIDC_AUTH_SERVER_URL=http://keycloak:8080/auth/realms/konveyor \
-e QUARKUS_OIDC_CLIENT_ID=controls-api \
-e QUARKUS_OIDC_CREDENTIALS_SECRET=secret \
quay.io/konveyor/tackle-controls:latest-native
sleep 5s && docker logs controls
- name: Application inventory API
run: |
docker run -d --name application-inventory --network ${{ job.services.application-inventory-db.network }} --network-alias application-inventory -p 8082:8080 \
-e QUARKUS_HTTP_PORT=8080 \
-e QUARKUS_DATASOURCE_USERNAME=user \
-e QUARKUS_DATASOURCE_PASSWORD=password \
-e QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://application-inventory-db:5432/application_inventory_db \
-e QUARKUS_OIDC_AUTH_SERVER_URL=http://keycloak:8080/auth/realms/konveyor \
-e QUARKUS_OIDC_CLIENT_ID=application-inventory-api \
-e QUARKUS_OIDC_CREDENTIALS_SECRET=secret \
quay.io/konveyor/tackle-application-inventory:latest-native
sleep 5s && docker logs application-inventory
- name: Pathfinder API
run: |
docker run -d --name pathfinder --network ${{ job.services.pathfinder-db.network }} --network-alias pathfinder -p 8083:8080 \
-e QUARKUS_HTTP_PORT=8080 \
-e QUARKUS_DATASOURCE_USERNAME=user \
-e QUARKUS_DATASOURCE_PASSWORD=password \
-e QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://pathfinder-db:5432/pathfinder_db \
-e QUARKUS_OIDC_AUTH_SERVER_URL=http://keycloak:8080/auth/realms/konveyor \
-e QUARKUS_OIDC_CLIENT_ID=pathfinder-api \
-e QUARKUS_OIDC_CREDENTIALS_SECRET=secret \
quay.io/konveyor/tackle-pathfinder:latest-native
sleep 5s && docker logs pathfinder
- name: Tackle UI
run: |
docker run -d --name tackle-ui --network ${{ job.services.keycloak.network }} --network-alias tackle-ui -p 3000:8080 \
-e SSO_REALM=konveyor \
-e SSO_CLIENT_ID=tackle-ui \
-e SSO_SERVER_URL=http://keycloak:8080/auth \
-e CONTROLS_API_URL=http://controls:8080/controls \
-e APPLICATION_INVENTORY_API_URL=http://application-inventory:8080/application-inventory \
-e PATHFINDER_API_URL=http://pathfinder:8080/pathfinder \
quay.io/konveyor/tackle-ui:main
sleep 5s && docker logs tackle-ui
- name: Cypress run
uses: cypress-io/github-action@v2
with:
record: false
wait-on: "http://localhost:3000"
wait-on-timeout: 120
config: pageLoadTimeout=100000
browser: ${{ matrix.browser }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_auth_base_url: http://localhost:3000/auth
CYPRESS_controls_base_url: http://localhost:8081/controls
CYPRESS_application_inventory_base_url: http://localhost:8082/application-inventory
CYPRESS_pathfinder_base_url: http://localhost:8083/pathfinder
- uses: actions/upload-artifact@v1
if: failure()
with:
name: container-screenshots-${{ matrix.os }}-${{ matrix.browser }}
path: cypress/screenshots
- uses: actions/upload-artifact@v1
if: always()
with:
name: container-videos-${{ matrix.os }}-${{ matrix.browser }}
path: cypress/videos
90 changes: 90 additions & 0 deletions .github/workflows/ci-daily.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: CI Daily

# Temporary definition just to test this workflow in PRs
on:
pull_request:
branches:
- main

# on:
# schedule:
# - cron: "0 0 * * *"
# workflow_dispatch: {}

jobs:
ks8:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
browser: [chrome]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: tackle-ui
- name: Checkout
uses: actions/checkout@v2
with:
repository: konveyor/tackle-ui-tests
path: tackle-ui-tests
- name: Setup Minikube
uses: manusa/actions-setup-minikube@v2.3.1
with:
minikube version: v1.18.1
kubernetes version: v1.20.2
start args: "--addons=registry --addons=ingress"
- name: Validate Minikube
run: minikube status | grep Running
- name: Validate Cluster
run: kubectl get nodes
- name: Validate enabled addon in arg
run: minikube addons list -o json | jq '.registry.Status' | grep enabled
- name: Kubectl create namespace
run: kubectl create ns tackle
- name: Deploy keycloak
run: |
kubectl create -f tackle-ui/kubernetes/keycloak -n tackle
kubectl wait deployment/keycloak --for condition=available --timeout=-1s -n tackle
- name: Deploy tackle-controls
run: |
kubectl create -f tackle-ui/kubernetes/controls -n tackle
kubectl wait deployment/tackle-controls --for condition=available --timeout=-1s -n tackle
- name: Deploy tackle-application-inventory
run: |
kubectl create -f tackle-ui/kubernetes/application-inventory -n tackle
kubectl wait deployment/tackle-application-inventory --for condition=available --timeout=-1s -n tackle
- name: Deploy tackle-pathfinder
run: |
kubectl create -f tackle-ui/kubernetes/pathfinder -n tackle
kubectl wait deployment/tackle-pathfinder --for condition=available --timeout=-1s -n tackle
- name: Deploy tackle-ui
run: |
kubectl create -f tackle-ui/kubernetes/ui -n tackle
kubectl wait deployment/tackle-ui --for condition=available --timeout=-1s -n tackle
- name: Kubectl create ingress
run: kubectl create -f tackle-ui/kubernetes/ing1.yml -n tackle
- name: Wait for Ingress
run: |
bash -c 'external_ip="";
while [ -z $external_ip ];
do echo "Waiting for end point...";
external_ip=$(kubectl get ingress tackle --template="{{range .status.loadBalancer.ingress}}{{.ip}}{{end}}" -n tackle);[ -z "$external_ip" ] &&
sleep 10;
done;
echo "End point ready:" &&
echo $external_ip;
export endpoint=$external_ip;
echo "CYPRESS_tackleUrl=https://$external_ip" >>$GITHUB_ENV'
- name: Cypress run
uses: cypress-io/github-action@v2
with:
working-directory: tackle-ui-tests
record: false
start: npx echo "Starting Minikube Cypress tests"
config: pageLoadTimeout=100000
browser: ${{ matrix.browser }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_user: admin
CYPRESS_pass: admin
84 changes: 84 additions & 0 deletions kubernetes/application-inventory/db-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
kind: Deployment
apiVersion: apps/v1
metadata:
name: application-inventory-db
labels:
app.kubernetes.io/name: application-inventory-db
app.kubernetes.io/version: "10.6"
app.kubernetes.io/component: database
app.kubernetes.io/instance: application-inventory-db
app.kubernetes.io/part-of: tackle
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: application-inventory-db
app.kubernetes.io/version: "10.6"
template:
metadata:
labels:
app.kubernetes.io/name: application-inventory-db
app.kubernetes.io/version: "10.6"
spec:
volumes:
- name: application-inventory-db-data
persistentVolumeClaim:
claimName: application-inventory-db
containers:
- name: postgres
image: postgres:10.6
ports:
- containerPort: 5432
protocol: TCP
env:
- name: POSTGRES_USER
value: application-inventory_username
- name: POSTGRES_PASSWORD
value: application-inventory_password
- name: POSTGRES_DB
value: application-inventory_db
resources: {}
livenessProbe:
exec:
command:
- /bin/sh
- "-c"
- |
psql -U $POSTGRES_USER -d $POSTGRES_DB -c 'SELECT 1'
initialDelaySeconds: 60
timeoutSeconds: 10
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
readinessProbe:
exec:
command:
- /bin/sh
- "-c"
- |
psql -U $POSTGRES_USER -d $POSTGRES_DB -c 'SELECT 1'
initialDelaySeconds: 10
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
terminationMessagePath: "/dev/termination-log"
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
volumeMounts:
- name: application-inventory-db-data
mountPath: "/var/lib/db"
securityContext:
privileged: false
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
securityContext: {}
schedulerName: default-scheduler
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%
revisionHistoryLimit: 10
progressDeadlineSeconds: 600
16 changes: 16 additions & 0 deletions kubernetes/application-inventory/db-pvc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: application-inventory-db
labels:
app.kubernetes.io/name: application-inventory-db
app.kubernetes.io/component: database
app.kubernetes.io/instance: application-inventory-db
app.kubernetes.io/part-of: tackle
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
volumeMode: Filesystem
21 changes: 21 additions & 0 deletions kubernetes/application-inventory/db-svc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
kind: Service
apiVersion: v1
metadata:
name: application-inventory-db
labels:
app.kubernetes.io/name: application-inventory-db
app.kubernetes.io/version: "10.6"
app.kubernetes.io/component: database
app.kubernetes.io/instance: application-inventory-db
app.kubernetes.io/part-of: tackle
spec:
ports:
- name: tcp
protocol: TCP
port: 5432
targetPort: 5432
selector:
app.kubernetes.io/name: application-inventory-db
app.kubernetes.io/version: "10.6"
type: ClusterIP
sessionAffinity: None
Loading