From 19d318946b1a4aac3ac1aa599a70fc1387a0cfae Mon Sep 17 00:00:00 2001 From: ajasibley <125228925+ajasibley@users.noreply.github.com> Date: Thu, 25 May 2023 12:23:07 -0700 Subject: [PATCH] Updated install_openssl.sh to properly set homebrew shell profile. Added message to just file promting user to restart shell following sucefull installation. Updated README to include steps for loging in to cosmonic and launching wasmCloust host. --- README.md | 28 ++++++++++++++++++++-------- justfile | 7 ++++++- scripts/install_openssl.sh | 7 +++++++ 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e6c112043..728cae165 100644 --- a/README.md +++ b/README.md @@ -89,29 +89,41 @@ impl HttpServer for Actor { ``` ## Launching the Project -1. Build and sign your actor: +1. Login to Cosmonic: + +```bash +cosmo login +``` + +2. Build and sign your actor: ```bash cosmo build ``` -2. Launch the actor using Cosmo CLI: +3. Start your wasmCloud host: + +```bash +cosmo up +``` + +4. Launch the actor using Cosmo CLI: ```bash cosmo launch ``` -3. Navigate to [Cosmonic App](https://app.cosmonic.com) and sign in with your account. +5. Navigate to [Cosmonic App](https://app.cosmonic.com) and sign in with your account. -4. In the Logic view, you should see the new actor you just launched. +6. In the Logic view, you should see the new actor you just launched. -5. To make your actor accessible from the web, launch a new provider for an HTTP server with the following OCI URL: `cosmonic.azurecr.io/httpserver_wormhole:0.5.3`. Give the link a name, and note that the HTTP server must be launched on a Cosmonic Manager resource. +7. To make your actor accessible from the web, launch a new provider for an HTTP server with the following OCI URL: `cosmonic.azurecr.io/httpserver_wormhole:0.5.3`. Give the link a name, and note that the HTTP server must be launched on a Cosmonic Manager resource. -6. Once the HTTP server is launched, link it to your actor. +8. Once the HTTP server is launched, link it to your actor. -7. Launch a wormhole and connect it to your actor link (the HTTP server and the actor). +9. Launch a wormhole and connect it to your actor link (the HTTP server and the actor). -8. Your actor should now be accessible at the domain of the wormhole followed by `.cosmonic.app`. For example: `https://white-morning-5041.cosmonic.app`. +10. Your actor should now be accessible at the domain of the wormhole followed by `.cosmonic.app`. For example: `https://white-morning-5041.cosmonic.app`. Now you can access your project from any web browser using the provided URL! diff --git a/justfile b/justfile index 78bed21d1..e95b1c308 100644 --- a/justfile +++ b/justfile @@ -33,4 +33,9 @@ install-cosmo: . {{scripts_dir}}/update_source.sh; \ fi -all: install-nix install-rust install-wasm-target install-openssl install-cosmo +# Print a message to restart the shell +restart-shell-message: + @echo + @echo "\033[1;33mPlease restart your shell to refresh the source before launching Cosmonic.\033[0m" + +all: install-nix install-rust install-wasm-target install-openssl install-cosmo restart-shell-message diff --git a/scripts/install_openssl.sh b/scripts/install_openssl.sh index a6dc47d88..9d22fc85d 100644 --- a/scripts/install_openssl.sh +++ b/scripts/install_openssl.sh @@ -9,6 +9,13 @@ if ! (command -v openssl &> /dev/null && openssl version | grep -q "OpenSSL 1.1" # MacOS M1 installation if ! command -v brew &> /dev/null; then /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + + (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> "$HOME/.zprofile" + + eval "$(/opt/homebrew/bin/brew shellenv)" + + echo 'export PATH="/opt/homebrew/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc + fi export PATH="/opt/homebrew/bin:$PATH"