diff --git a/.ci/functional_test.sh b/.ci/functional_test.sh index 78c863da1..bb082e952 100755 --- a/.ci/functional_test.sh +++ b/.ci/functional_test.sh @@ -1,24 +1,21 @@ #!/usr/bin/env bash -set -x +set -xe sudo apt-get update sudo apt-get install -y postgresql \ wireguard iptables net-tools curl ca-certificates sudo systemctl start postgresql -sudo dpkg -i cloudfire*.deb -echo "Enabling service..." -sudo systemctl start cloudfire +echo "Setting capabilities" +sudo setcap "cap_net_admin+ep" cloudfire +sudo setcap "cap_net_raw+ep" cloudfire +sudo setcap "cap_dac_read_search+ep" cloudfire + +./cloudfire & # Wait for app to start sleep 10 -echo "Service status..." -sudo systemctl status cloudfire.service - -echo "Printing service logs..." -sudo journalctl -u cloudfire.service - echo "Trying to load homepage..." curl -i -vvv -k https://$(hostname):8800/ diff --git a/.ci/install_runtimes.sh b/.ci/install_runtimes.sh index 0f6dad2b2..54596e3f5 100755 --- a/.ci/install_runtimes.sh +++ b/.ci/install_runtimes.sh @@ -3,9 +3,13 @@ set -e os_name='ubuntu~bionic' +sudo apt-get install wget + wget -O erlang.deb https://packages.erlang-solutions.com/erlang/debian/pool/esl-erlang_24.0.2-1~${os_name}_${arch}.deb wget -O elixir.deb https://packages.erlang-solutions.com/erlang/debian/pool/elixir_1.12.0-1~${os_name}_all.deb sudo dpkg -i erlang.deb sudo dpkg -i elixir.deb +sudo apt-get install --fix-missing + curl -sL https://deb.nodesource.com/setup_14.x | sudo bash - diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0aaa3520c..025a3e9d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,48 +88,31 @@ jobs: bash -c '.ci/install_runtimes.sh' bash -c '.ci/build_release.sh' - # build: - # needs: unit-integration-test - # runs-on: ubuntu-18.04 - # strategy: - # matrix: - # os: [ubuntu-18.04] - # env: - # MATRIX_OS: ${{ matrix.os }} - # steps: - # - name: Install runtimes - # run: .ci/install_runtimes.sh - # - name: Build release - # env: - # MIX_ENV: prod - # run: .ci/build_release.sh - # - name: Build deb - # run: .ci/build_deb.sh - # - name: Rename Built Artifacts - # run: .ci/rename_artifacts.sh - # - uses: actions/upload-artifact@v2 - # with: - # name: cloudfire-deb - # path: "cloudfire*.deb" + - name: Rename Built Artifacts + run: .ci/rename_artifacts.sh + - uses: actions/upload-artifact@v2 + with: + name: cloudfire-${{ matrix.arch }} + path: "_build/prod/rel/cloudfire/bin/cloudfire" - # functional-test: - # needs: build-linux - # runs-on: ${{ matrix.os }} - # strategy: - # matrix: - # os: [ubuntu-20.04] - # env: - # MATRIX_OS: ${{ matrix.os }} - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/download-artifact@v2 - # with: - # name: cloudfire-deb - # - name: Test Install package - # env: - # DEBIAN_FRONTEND: noninteractive - # run: .ci/functional_test.sh + functional-test: + needs: build-linux + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-18.04] + env: + MATRIX_OS: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - uses: actions/download-artifact@v2 + with: + name: cloudfire-amd64 + - name: Test Install package + env: + DEBIAN_FRONTEND: noninteractive + run: .ci/functional_test.sh # # publish: # needs: functional-test diff --git a/README.md b/README.md index f0b8d7609..66a29d205 100644 --- a/README.md +++ b/README.md @@ -42,17 +42,8 @@ For now, CloudFire assumes these apps are all running on the same host. ## Setup -Currently, the only supported method of running CloudFire is locally. MacOS and -Linux users shouldn't have any problems. Windows will Probably Work™. +`curl https://github.com/CloudFire-LLC/cloudfire/releases/download/latest/cloudfire-init.sh | sudo bash -E` -You'll need recent versions of the following tools installed: - -- ansible -- vagrant -- VirtualBox - -With the above installed, you should be able to navigate into the project root -and just run: ```bash vagrant up