diff --git a/.env b/.env index e139fdda..307c9d35 100644 --- a/.env +++ b/.env @@ -32,6 +32,7 @@ SHUFFLE_ENCRYPTION_MODIFIER= # Other configs BASE_URL=http://shuffle-backend:5001 +SSO_REDIRECT_URL=http://localhost:3001 BACKEND_HOSTNAME=shuffle-backend BACKEND_PORT=5001 FRONTEND_PORT=3001 @@ -50,16 +51,17 @@ SHUFFLE_PASS_WORKER_PROXY=TRUE SHUFFLE_PASS_APP_PROXY=FALSE TZ=Europe/Amsterdam # Timezone-handler in Orborus, Worker and Apps ORBORUS_CONTAINER_NAME= # Used to FIND the containername. cgroup v2: issue 501 +SHUFFLE_ORBORUS_STARTUP_DELAY= # Used for setting up a startup delay for Orborus -SHUFFLE_BASE_IMAGE_NAME=frikky +SHUFFLE_BASE_IMAGE_NAME=shuffle SHUFFLE_BASE_IMAGE_REGISTRY=ghcr.io -SHUFFLE_BASE_IMAGE_TAG_SUFFIX="-0.8.80" +SHUFFLE_BASE_IMAGE_TAG_SUFFIX="-1.0.0" # Used for auto-cleanup of containers. REALLY important at scale. SHUFFLE_CONTAINER_AUTO_CLEANUP=false SHUFFLE_ELASTIC=true SHUFFLE_LOGS_DISABLED=false -SHUFFLE_CHAT_DISABLED=false +SHUFFLE_CHAT_DISABLED=false # Controls support chat SHUFFLE_RERUN_SCHEDULE=300 # DATABASE CONFIGURATIONS diff --git a/.github/install-guide.md b/.github/install-guide.md index cac7b3b2..73550fca 100644 --- a/.github/install-guide.md +++ b/.github/install-guide.md @@ -11,7 +11,7 @@ The Docker setup is done with docker-compose 1. Make sure you have [Docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/install/) installed. 2. Download Shuffle ```bash -git clone https://github.com/frikky/Shuffle +git clone https://github.com/Shuffle/Shuffle cd Shuffle ``` @@ -87,9 +87,13 @@ http://localhost:5001 - REST API - requires [>=go1.13](https://golang.org/dl/) ```bash export SHUFFLE_OPENSEARCH_URL="http://localhost:9200" export SHUFFLE_ELASTIC=true +export SHUFFLE_OPENSEARCH_USERNAME=admin +export SHUFFLE_OPENSEARCH_PASSWORD=admin +export SHUFFLE_OPENSEARCH_SKIPSSL_VERIFY=true cd backend/go-app go run main.go walkoff.go docker.go ``` +**WINDOWS USERS:** Follow [this guide](https://www.wikihow.com/Create-an-Environment-Variable-in-Windows-10) to add environment variables in your machine. Large portions of the backend is written in another repository - [shuffle-shared](https://github.com/frikky/shuffle-shared). If you want to update any of this code and test in realtime, we recommend following these steps: 1. Clone shuffle-shared to a local repository @@ -101,8 +105,6 @@ Large portions of the backend is written in another repository - [shuffle-shared 4. Make the changes you want, then restart the backend server! 5. With your changes made, make a pull request :fire: -**WINDOWS USERS:** You'll have to to add the "export" part as an environment variable. - ## Database - Opensearch Make sure this is running through the docker-compose, and that the backend points to it with SHUFFLE_OPENSEARCH_URL defined @@ -122,6 +124,4 @@ export BASE_URL=http://YOUR-IP:5001 export DOCKER_API_VERSION=1.40 ``` -**WINDOWS USERS:** You'll have to to add the "export" part as an environment variable. - AND THAT's it - hopefully it worked. If it didn't please email [frikky@shuffler.io](mailto:frikky@shuffler.io) diff --git a/.github/push_nightly.sh b/.github/push_nightly.sh new file mode 100644 index 00000000..92d5320b --- /dev/null +++ b/.github/push_nightly.sh @@ -0,0 +1,47 @@ +# This can be done in the dockerpush workflow itself +# Done manually for now since GHCR isn't being pushed to easily with the current Github action CI. Nightly = Latest IF we run hotfixes on latest + +### Pull latest from ghcr CI/CD +#docker pull ghcr.io/shuffle/shuffle-app_sdk:nightly +#docker pull ghcr.io/shuffle/shuffle-worker:nightly +#docker pull ghcr.io/shuffle/shuffle-orborus:nightly +#docker pull ghcr.io/shuffle/shuffle-frontend:nightly +#docker pull ghcr.io/shuffle/shuffle-backend:nightly + +### LATEST releases: +#docker tag ghcr.io/shuffle/shuffle-app_sdk:nightly ghcr.io/shuffle/shuffle-app_sdk:latest +#docker tag ghcr.io/shuffle/shuffle-worker:nightly ghcr.io/shuffle/shuffle-worker:latest +#docker tag ghcr.io/shuffle/shuffle-orborus:nightly ghcr.io/shuffle/shuffle-orborus:latest +#docker tag ghcr.io/shuffle/shuffle-frontend:nightly ghcr.io/shuffle/shuffle-frontend:latest +#docker tag ghcr.io/shuffle/shuffle-backend:nightly ghcr.io/shuffle/shuffle-backend:latest +# +#docker push ghcr.io/shuffle/shuffle-app_sdk:latest +#docker push ghcr.io/shuffle/shuffle-worker:latest +#docker push ghcr.io/shuffle/shuffle-orborus:latest +#docker push ghcr.io/shuffle/shuffle-frontend:latest +#docker push ghcr.io/shuffle/shuffle-backend:latest + + +### 1.1.0 releases: +#docker tag ghcr.io/shuffle/shuffle-app_sdk:nightly ghcr.io/shuffle/shuffle-app_sdk:1.1.0 +#docker tag ghcr.io/shuffle/shuffle-worker:nightly ghcr.io/shuffle/shuffle-worker:1.1.0 +#docker tag ghcr.io/shuffle/shuffle-orborus:nightly ghcr.io/shuffle/shuffle-orborus:1.1.0 +#docker tag ghcr.io/shuffle/shuffle-frontend:nightly ghcr.io/shuffle/shuffle-frontend:1.1.0 +#docker tag ghcr.io/shuffle/shuffle-backend:nightly ghcr.io/shuffle/shuffle-backend:1.1.0 +# +#docker push ghcr.io/shuffle/shuffle-app_sdk:1.1.0 +#docker push ghcr.io/shuffle/shuffle-worker:1.1.0 +#docker push ghcr.io/shuffle/shuffle-orborus:1.1.0 +#docker push ghcr.io/shuffle/shuffle-frontend:1.1.0 +#docker push ghcr.io/shuffle/shuffle-backend:1.1.0 + + + +### Manage worker-scale upload (Requires auth) +# This is supposed to be unavailable, and only be downloadable by customers +docker pull ghcr.io/shuffle/shuffle-worker-scale:latest +docker save ghcr.io/shuffle/shuffle-worker-scale:latest -o shuffle-worker.zip +echo "1. Upload shuffle-worker.zip to the shuffler.io public repo. If in Github Dev env, download the file, and upload manually." +echo "2. Have customers download it with: $ wget URL" +echo "3. Have customers use with with: docker load shuffle-worker.zip" + diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index b82be082..00006b66 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,11 +39,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -54,7 +54,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 # âšī¸ Command-line programs to run using the OS shell. # đ https://git.io/JvXDl @@ -68,4 +68,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/ci.yaml b/.github/workflows/docker-build.yaml similarity index 89% rename from .github/workflows/ci.yaml rename to .github/workflows/docker-build.yaml index 6b235f6b..716b42db 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/docker-build.yaml @@ -1,8 +1,8 @@ -name: ci +name: docker-build on: push: - branches: master + branches: launch jobs: main: runs-on: ubuntu-latest @@ -13,19 +13,19 @@ jobs: include: - app: frontend path: frontend - version: 0.8.3 + version: 1.0.0 experimental: true - app: backend path: backend - version: 0.8.3 + version: 1.0.0 experimental: false - app: orborus path: functions/onprem/orborus - version: 0.8.0 + version: 1.0.0 experimental: false - app: database path: backend/database - version: 0.8.0 + version: 1.0.0 experimental: false steps: - @@ -63,4 +63,4 @@ jobs: tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.app }}:${{ matrix.version }} - name: Image digest - run: echo ${{ steps.docker_build.outputs.digest }} \ No newline at end of file + run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/.github/workflows/dockerbuild.yaml b/.github/workflows/dockerbuild.yaml new file mode 100644 index 00000000..0594f24b --- /dev/null +++ b/.github/workflows/dockerbuild.yaml @@ -0,0 +1,75 @@ +name: dockerbuild + +on: + push: + branches: 1.2.0 +jobs: + main: + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental }} + strategy: + fail-fast: false + matrix: + include: + - app: frontend + path: frontend + version: nightly + experimental: true + - app: backend + path: backend + version: nightly + experimental: true + - app: app_sdk + path: backend/app_sdk + version: nightly + experimental: true + - app: orborus + path: functions/onprem/orborus + version: nightly + experimental: true + - app: worker + path: functions/onprem/worker + version: nightly + experimental: true + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Login to Ghcr + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Ghcr Build and push + id: docker_build + uses: docker/build-push-action@v3 + env: + BUILDX_NO_DEFAULT_LOAD: true + with: + logout: false + context: ${{ matrix.path }}/ + file: ${{ matrix.path }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache + tags: | + ghcr.io/shuffle/shuffle-${{ matrix.app }}:nightly + ${{ secrets.DOCKERHUB_USERNAME }}/shuffle-${{ matrix.app }}:nightly + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 00000000..b3d1927e --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,13 @@ +on: + push: + branches: + - launch +name: release-please +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v3 + with: + release-type: node + package-name: release-please-action diff --git a/.github/workflows/snyk-container-analysis.yml b/.github/workflows/snyk-container-analysis.yml index b3a78761..f9a406b2 100644 --- a/.github/workflows/snyk-container-analysis.yml +++ b/.github/workflows/snyk-container-analysis.yml @@ -11,7 +11,6 @@ name: Snyk Container on: push: branches: - - master - launch pull_request: # The branches below must be a subset of the branches above @@ -25,9 +24,12 @@ jobs: snyk: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 + - name: Build a Docker image - run: docker build -t your/image-to-test . + run: docker build -t frontend . + - name: Run Snyk to check Docker image for vulnerabilities # Snyk can be used to break the build when it detects vulnerabilities. # In this case we want to upload the issues to GitHub Code Scanning @@ -41,6 +43,7 @@ jobs: with: image: your/image-to-test args: --file=Dockerfile + - name: Upload result to GitHub Code Scanning uses: github/codeql-action/upload-sarif@v1 with: diff --git a/.github/workflows/upload_sdk.yml b/.github/workflows/upload_sdk.yml index f76e9adb..9faa33e4 100644 --- a/.github/workflows/upload_sdk.yml +++ b/.github/workflows/upload_sdk.yml @@ -1,12 +1,12 @@ # This is a basic workflow to help you get started with Actions -name: CI +name: App SDK upload # Controls when the workflow will run on: # Triggers the workflow on push or pull request events but only for the main branch push: - branches: [ master ] + branches: [ master, launch ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: diff --git a/README.md b/README.md index 17c5c7b8..e937f939 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,9 @@ Shuffle Automation +[](https://github.com/Shuffle/Shuffle/actions/workflows/codeql-analysis.yml) +[](https://github.com/Shuffle/Shuffle/actions/workflows/dockerbuild.yaml) +
{
+ console.log("Img loaded.")
+ setTimeout(() => {
+ console.log("Img closing.")
+ setConfigureWorkflowModalOpen(false);
+ }, 1250)
+
+ }}/>
+ :
+
+
+
+
+ - Shuffle is a flexible, easy to use, automation platform - allowing users to integrate their services and devices freely. - It's made to significantly reduce the amount of manual labor, - and is focused on security applications.{" "} - - Click here to learn more. - -
-+ // Shuffle is a flexible, easy to use, automation platform + // allowing users to integrate their services and devices freely. + // It's made to significantly reduce the amount of manual labor, + // and is focused on security applications.{" "} + // + // Click here to learn more. + // + //
+ //
+