diff --git a/.github/workflows/build-multichannelchat.yml b/.github/workflows/build-multichannelchat.yml index 2303db1..fe2527e 100644 --- a/.github/workflows/build-multichannelchat.yml +++ b/.github/workflows/build-multichannelchat.yml @@ -14,10 +14,10 @@ jobs: fail-fast: false matrix: working-directory: - - multi-channel-chat/api-gateway + - multi-channel-chat/apigateway - multi-channel-chat/chatlog - - multi-channel-chat/http-channel - - multi-channel-chat/nats-channel + - multi-channel-chat/httpchannel + - multi-channel-chat/natschannel steps: - uses: actions/checkout@v3 - name: Add wasm32-unknown-unknown diff --git a/.github/workflows/release-multichannelchat.yml b/.github/workflows/release-multichannelchat.yml index 7887bd6..a35fdd6 100644 --- a/.github/workflows/release-multichannelchat.yml +++ b/.github/workflows/release-multichannelchat.yml @@ -16,37 +16,31 @@ jobs: fail-fast: false matrix: working-directory: - - multi-channel-chat/api-gateway + - multi-channel-chat/apigateway - multi-channel-chat/chatlog - - multi-channel-chat/http-channel - - multi-channel-chat/nats-channel + - multi-channel-chat/httpchannel + - multi-channel-chat/natschannel include: - - working-directory: multi-channel-chat/api-gateway - artifact-name: api-gateway + - working-directory: multi-channel-chat/apigateway + artifact-name: apigateway + wash-key: AWESOME_COSMONIC_MCC_APIGATEWAY_KEY - working-directory: multi-channel-chat/chatlog artifact-name: chatlog - - working-directory: multi-channel-chat/http-channel - artifact-name: http-channel - - working-directory: multi-channel-chat/nats-channel - artifact-name: nats-channel + wash-key: AWESOME_COSMONIC_MCC_CHATLOG_KEY + - working-directory: multi-channel-chat/httpchannel + artifact-name: httpchannel + wash-key: AWESOME_COSMONIC_MCC_HTTPCHANNEL_KEY + - working-directory: multi-channel-chat/natschannel + artifact-name: natschannel + wash-key: AWESOME_COSMONIC_MCC_NATSCHANNEL_KEY steps: - uses: actions/checkout@v3 - uses: wasmcloud/common-actions/install-wash@main - name: Add wasm32-unknown-unknown run: rustup target add wasm32-unknown-unknown - - name: Set wash subject key (api-gateway) - if: ${{ matrix.artifact-name == 'api-gateway' }} - run: echo "WASH_SUBJECT_KEY=${{ secrets.AWESOME_COSMONIC_MCC_APIGATEWAY_KEY }}" > $GITHUB_ENV - - name: Set wash subject key (chatlog) - if: ${{ matrix.artifact-name == 'chatlog' }} - run: echo "WASH_SUBJECT_KEY=${{ secrets.AWESOME_COSMONIC_MCC_CHATLOG_KEY }}" > $GITHUB_ENV - - name: Set wash subject key (http-channel) - if: ${{ matrix.artifact-name == 'http-channel' }} - run: echo "WASH_SUBJECT_KEY=${{ secrets.AWESOME_COSMONIC_MCC_HTTPCHANNEL_KEY }}" > $GITHUB_ENV - - name: Set wash subject key (nats-channel) - if: ${{ matrix.artifact-name == 'nats-channel' }} - run: echo "WASH_SUBJECT_KEY=${{ secrets.AWESOME_COSMONIC_MCC_NATSCHANNEL_KEY }}" > $GITHUB_ENV + - name: Set wash subject key + run: echo "WASH_SUBJECT_KEY=${{ secrets[matrix.wash-key] }}" > $GITHUB_ENV - name: Build and sign wasmCloud actor env: @@ -68,19 +62,19 @@ jobs: fail-fast: false matrix: working-directory: - - multi-channel-chat/api-gateway + - multi-channel-chat/apigateway - multi-channel-chat/chatlog - - multi-channel-chat/http-channel - - multi-channel-chat/nats-channel + - multi-channel-chat/httpchannel + - multi-channel-chat/natschannel include: - - working-directory: multi-channel-chat/api-gateway - artifact-name: api-gateway + - working-directory: multi-channel-chat/apigateway + artifact-name: apigateway - working-directory: multi-channel-chat/chatlog artifact-name: chatlog - - working-directory: multi-channel-chat/http-channel - artifact-name: http-channel - - working-directory: multi-channel-chat/nats-channel - artifact-name: nats-channel + - working-directory: multi-channel-chat/httpchannel + artifact-name: httpchannel + - working-directory: multi-channel-chat/natschannel + artifact-name: natschannel steps: - uses: actions/checkout@v3 - uses: wasmcloud/common-actions/install-wash@main @@ -94,20 +88,14 @@ jobs: echo "actor-name=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[].name')" >> $GITHUB_ENV working-directory: ${{ matrix.working-directory }} - name: Determine actor version - if: startswith(github.ref, 'refs/tags/') # Only run on tag push run: | echo "actor-version=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[].version')" >> $GITHUB_ENV working-directory: ${{ matrix.working-directory }} - - name: Determine actor version (main) - if: ${{ !startswith(github.ref, 'refs/tags/') }} - run: | - echo "actor-version=latest" >> $GITHUB_ENV - working-directory: ${{ matrix.working-directory }} - name: Push actor to AzureCR uses: wasmcloud/common-actions/oci-artifact-release@main with: artifact-path: ${{ matrix.working-directory }}/build/${{ env.actor-name }}_s.wasm - oci-url: ${{ secrets.AZURECR_PUSH_URL }} + oci-url: ${{ secrets.AZURECR_PUSH_URL }} oci-repository: ${{ env.actor-name }} oci-version: ${{ env.actor-version }} oci-username: ${{ secrets.COSMONIC_AZURECR_PUSH_USER }} diff --git a/multi-channel-chat/README.md b/multi-channel-chat/README.md index c963fbd..bd75bf8 100644 --- a/multi-channel-chat/README.md +++ b/multi-channel-chat/README.md @@ -6,9 +6,9 @@ For the full guide and walkthrough for this application, check out the relevant ## Components The chat application is made up of the following components (_all of which are actors_): -* [API Gateway](./api-gateway/README.md) - The API gateway used by all channels +* [API Gateway](./apigateway/README.md) - The API gateway used by all channels * [Chatlog](./chatlog/README.md) - The chat log actor, performs read/write operations on message storage -* [HTTP Channel](./http-channel/README.md) - The HTTP channel actor. Accepts HTTP requests and relays them to the API gateway -* [NATS Channel](./nats-channel/README.md) - The NATS channel actor. Accepts new message requests and publishes messages as they arrive in real-time +* [HTTP Channel](./httpchannel/README.md) - The HTTP channel actor. Accepts HTTP requests and relays them to the API gateway +* [NATS Channel](./natschannel/README.md) - The NATS channel actor. Accepts new message requests and publishes messages as they arrive in real-time The shared schema definition for the `Outbound` service definition and the `Chatlog` service definition can be found in the [interface](./interface/README.md) directory. \ No newline at end of file diff --git a/multi-channel-chat/api-gateway/.cargo/config.toml b/multi-channel-chat/apigateway/.cargo/config.toml similarity index 100% rename from multi-channel-chat/api-gateway/.cargo/config.toml rename to multi-channel-chat/apigateway/.cargo/config.toml diff --git a/multi-channel-chat/api-gateway/.github/workflows/build.yml b/multi-channel-chat/apigateway/.github/workflows/build.yml similarity index 100% rename from multi-channel-chat/api-gateway/.github/workflows/build.yml rename to multi-channel-chat/apigateway/.github/workflows/build.yml diff --git a/multi-channel-chat/api-gateway/.github/workflows/release.yml b/multi-channel-chat/apigateway/.github/workflows/release.yml similarity index 100% rename from multi-channel-chat/api-gateway/.github/workflows/release.yml rename to multi-channel-chat/apigateway/.github/workflows/release.yml diff --git a/multi-channel-chat/api-gateway/.gitignore b/multi-channel-chat/apigateway/.gitignore similarity index 100% rename from multi-channel-chat/api-gateway/.gitignore rename to multi-channel-chat/apigateway/.gitignore diff --git a/multi-channel-chat/api-gateway/Cargo.lock b/multi-channel-chat/apigateway/Cargo.lock similarity index 100% rename from multi-channel-chat/api-gateway/Cargo.lock rename to multi-channel-chat/apigateway/Cargo.lock diff --git a/multi-channel-chat/api-gateway/Cargo.toml b/multi-channel-chat/apigateway/Cargo.toml similarity index 100% rename from multi-channel-chat/api-gateway/Cargo.toml rename to multi-channel-chat/apigateway/Cargo.toml diff --git a/multi-channel-chat/api-gateway/README.md b/multi-channel-chat/apigateway/README.md similarity index 100% rename from multi-channel-chat/api-gateway/README.md rename to multi-channel-chat/apigateway/README.md diff --git a/multi-channel-chat/api-gateway/build.rs b/multi-channel-chat/apigateway/build.rs similarity index 100% rename from multi-channel-chat/api-gateway/build.rs rename to multi-channel-chat/apigateway/build.rs diff --git a/multi-channel-chat/api-gateway/codegen.toml b/multi-channel-chat/apigateway/codegen.toml similarity index 100% rename from multi-channel-chat/api-gateway/codegen.toml rename to multi-channel-chat/apigateway/codegen.toml diff --git a/multi-channel-chat/api-gateway/src/chatlog.rs b/multi-channel-chat/apigateway/src/chatlog.rs similarity index 100% rename from multi-channel-chat/api-gateway/src/chatlog.rs rename to multi-channel-chat/apigateway/src/chatlog.rs diff --git a/multi-channel-chat/api-gateway/src/lib.rs b/multi-channel-chat/apigateway/src/lib.rs similarity index 100% rename from multi-channel-chat/api-gateway/src/lib.rs rename to multi-channel-chat/apigateway/src/lib.rs diff --git a/multi-channel-chat/api-gateway/src/outbound.rs b/multi-channel-chat/apigateway/src/outbound.rs similarity index 100% rename from multi-channel-chat/api-gateway/src/outbound.rs rename to multi-channel-chat/apigateway/src/outbound.rs diff --git a/multi-channel-chat/api-gateway/wasmcloud.toml b/multi-channel-chat/apigateway/wasmcloud.toml similarity index 100% rename from multi-channel-chat/api-gateway/wasmcloud.toml rename to multi-channel-chat/apigateway/wasmcloud.toml diff --git a/multi-channel-chat/http-channel/.cargo/config.toml b/multi-channel-chat/httpchannel/.cargo/config.toml similarity index 100% rename from multi-channel-chat/http-channel/.cargo/config.toml rename to multi-channel-chat/httpchannel/.cargo/config.toml diff --git a/multi-channel-chat/http-channel/.github/workflows/build.yml b/multi-channel-chat/httpchannel/.github/workflows/build.yml similarity index 100% rename from multi-channel-chat/http-channel/.github/workflows/build.yml rename to multi-channel-chat/httpchannel/.github/workflows/build.yml diff --git a/multi-channel-chat/http-channel/.github/workflows/release.yml b/multi-channel-chat/httpchannel/.github/workflows/release.yml similarity index 100% rename from multi-channel-chat/http-channel/.github/workflows/release.yml rename to multi-channel-chat/httpchannel/.github/workflows/release.yml diff --git a/multi-channel-chat/http-channel/.gitignore b/multi-channel-chat/httpchannel/.gitignore similarity index 100% rename from multi-channel-chat/http-channel/.gitignore rename to multi-channel-chat/httpchannel/.gitignore diff --git a/multi-channel-chat/http-channel/Cargo.lock b/multi-channel-chat/httpchannel/Cargo.lock similarity index 100% rename from multi-channel-chat/http-channel/Cargo.lock rename to multi-channel-chat/httpchannel/Cargo.lock diff --git a/multi-channel-chat/http-channel/Cargo.toml b/multi-channel-chat/httpchannel/Cargo.toml similarity index 100% rename from multi-channel-chat/http-channel/Cargo.toml rename to multi-channel-chat/httpchannel/Cargo.toml diff --git a/multi-channel-chat/http-channel/README.md b/multi-channel-chat/httpchannel/README.md similarity index 100% rename from multi-channel-chat/http-channel/README.md rename to multi-channel-chat/httpchannel/README.md diff --git a/multi-channel-chat/http-channel/build.rs b/multi-channel-chat/httpchannel/build.rs similarity index 100% rename from multi-channel-chat/http-channel/build.rs rename to multi-channel-chat/httpchannel/build.rs diff --git a/multi-channel-chat/http-channel/codegen.toml b/multi-channel-chat/httpchannel/codegen.toml similarity index 100% rename from multi-channel-chat/http-channel/codegen.toml rename to multi-channel-chat/httpchannel/codegen.toml diff --git a/multi-channel-chat/http-channel/src/chatlog.rs b/multi-channel-chat/httpchannel/src/chatlog.rs similarity index 100% rename from multi-channel-chat/http-channel/src/chatlog.rs rename to multi-channel-chat/httpchannel/src/chatlog.rs diff --git a/multi-channel-chat/http-channel/src/lib.rs b/multi-channel-chat/httpchannel/src/lib.rs similarity index 100% rename from multi-channel-chat/http-channel/src/lib.rs rename to multi-channel-chat/httpchannel/src/lib.rs diff --git a/multi-channel-chat/http-channel/src/outbound.rs b/multi-channel-chat/httpchannel/src/outbound.rs similarity index 100% rename from multi-channel-chat/http-channel/src/outbound.rs rename to multi-channel-chat/httpchannel/src/outbound.rs diff --git a/multi-channel-chat/http-channel/wasmcloud.toml b/multi-channel-chat/httpchannel/wasmcloud.toml similarity index 100% rename from multi-channel-chat/http-channel/wasmcloud.toml rename to multi-channel-chat/httpchannel/wasmcloud.toml diff --git a/multi-channel-chat/multi-channel-chat.wadm.yaml b/multi-channel-chat/multi-channel-chat.wadm.yaml new file mode 100644 index 0000000..1a1aebe --- /dev/null +++ b/multi-channel-chat/multi-channel-chat.wadm.yaml @@ -0,0 +1 @@ +# WIP \ No newline at end of file diff --git a/multi-channel-chat/nats-channel/.cargo/config.toml b/multi-channel-chat/natschannel/.cargo/config.toml similarity index 100% rename from multi-channel-chat/nats-channel/.cargo/config.toml rename to multi-channel-chat/natschannel/.cargo/config.toml diff --git a/multi-channel-chat/nats-channel/.github/workflows/build.yml b/multi-channel-chat/natschannel/.github/workflows/build.yml similarity index 100% rename from multi-channel-chat/nats-channel/.github/workflows/build.yml rename to multi-channel-chat/natschannel/.github/workflows/build.yml diff --git a/multi-channel-chat/nats-channel/.github/workflows/release.yml b/multi-channel-chat/natschannel/.github/workflows/release.yml similarity index 100% rename from multi-channel-chat/nats-channel/.github/workflows/release.yml rename to multi-channel-chat/natschannel/.github/workflows/release.yml diff --git a/multi-channel-chat/nats-channel/.gitignore b/multi-channel-chat/natschannel/.gitignore similarity index 100% rename from multi-channel-chat/nats-channel/.gitignore rename to multi-channel-chat/natschannel/.gitignore diff --git a/multi-channel-chat/nats-channel/Cargo.lock b/multi-channel-chat/natschannel/Cargo.lock similarity index 100% rename from multi-channel-chat/nats-channel/Cargo.lock rename to multi-channel-chat/natschannel/Cargo.lock diff --git a/multi-channel-chat/nats-channel/Cargo.toml b/multi-channel-chat/natschannel/Cargo.toml similarity index 100% rename from multi-channel-chat/nats-channel/Cargo.toml rename to multi-channel-chat/natschannel/Cargo.toml diff --git a/multi-channel-chat/nats-channel/README.md b/multi-channel-chat/natschannel/README.md similarity index 100% rename from multi-channel-chat/nats-channel/README.md rename to multi-channel-chat/natschannel/README.md diff --git a/multi-channel-chat/nats-channel/build.rs b/multi-channel-chat/natschannel/build.rs similarity index 100% rename from multi-channel-chat/nats-channel/build.rs rename to multi-channel-chat/natschannel/build.rs diff --git a/multi-channel-chat/nats-channel/codegen.toml b/multi-channel-chat/natschannel/codegen.toml similarity index 100% rename from multi-channel-chat/nats-channel/codegen.toml rename to multi-channel-chat/natschannel/codegen.toml diff --git a/multi-channel-chat/nats-channel/src/chatlog.rs b/multi-channel-chat/natschannel/src/chatlog.rs similarity index 100% rename from multi-channel-chat/nats-channel/src/chatlog.rs rename to multi-channel-chat/natschannel/src/chatlog.rs diff --git a/multi-channel-chat/nats-channel/src/lib.rs b/multi-channel-chat/natschannel/src/lib.rs similarity index 100% rename from multi-channel-chat/nats-channel/src/lib.rs rename to multi-channel-chat/natschannel/src/lib.rs diff --git a/multi-channel-chat/nats-channel/src/outbound.rs b/multi-channel-chat/natschannel/src/outbound.rs similarity index 100% rename from multi-channel-chat/nats-channel/src/outbound.rs rename to multi-channel-chat/natschannel/src/outbound.rs diff --git a/multi-channel-chat/nats-channel/wasmcloud.toml b/multi-channel-chat/natschannel/wasmcloud.toml similarity index 100% rename from multi-channel-chat/nats-channel/wasmcloud.toml rename to multi-channel-chat/natschannel/wasmcloud.toml