Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VIDCS-3398: Setup local VCR deployment workflow #73

Merged
merged 19 commits into from
Feb 19, 2025

Conversation

maikthomas
Copy link
Collaborator

@maikthomas maikthomas commented Feb 14, 2025

What is this PR doing?

  • Setup the repo for easy deployment to VCR from local env for developers

How should this be manually tested?

Please follow the instructions added in the readme and validate that everything works as expected.

What are the relevant tickets?

A maintainer will add this ticket number.

Resolves VIDCS-3398

Checklist

[👍] Branch is based on develop (not main).
[👎] Resolves a Known Issue.
[👎] If yes, did you remove the item from the docs/KNOWN_ISSUES.md?
[👎] Resolves an item reported in Issues.
If yes, which issue? Issue Number?

@maikthomas maikthomas force-pushed the mthomas/VIDCS-3398-local-vcr branch from 2922920 to dd95854 Compare February 14, 2025 13:42
@@ -24,7 +24,8 @@
"dotenv": "^16.0.3",
"express": "^4.21.2",
"form-data": "^4.0.1",
"opentok": "^2.16.0"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just moving things around to make sure all dependencies required to build and run the project are in dependencies not devDependencies. By default VCR will run yarn in production mode, only installing dependencies.

.vcrignore Outdated
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ignore avoid sending files we don't want to VCR, which increases the deploy time and is also pointless - also node_modules will not work there if built on mac.

vcrBuildLocal.sh Outdated
@@ -0,0 +1,5 @@
#!/bin/bash
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment here would be nice. Indicating that this is to build dependencies and build the app in the machine used by VCR rather than uploading the build built locally https://developer.vonage.com/en/vonage-cloud-runtime/guides/manifest#build-script

javiermolsanz
javiermolsanz previously approved these changes Feb 14, 2025
Copy link
Collaborator

@javiermolsanz javiermolsanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to approve for now and once there's another ✅ I'll test it. Also we need to update the readme with the new deployment instructions

@dwivedisachin
Copy link
Collaborator

I just tested it and I was able to deploy to my instance. 🚀
Do you think we should add the steps to create app id too 🤔

README.md Outdated

Then create a workspace named `dev` (Or change the instance name in `./vcr_local.yml#L4`). See https://developer.vonage.com/en/vonage-cloud-runtime/getting-started/managing-projects.

Install the `vcr` cli globally with `npm i -g vcr`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good catch thank you!

README.md Outdated

You can easily deploy your local branch to Vonage Cloud Runtime (VCR) using the tools in this repository.

First, set up your VCR application at https://developer.vonage.com/en/vonage-cloud-runtime/overview. One you have your application, get your application ID and set it in your config `VCR_APP_ID` in the top level `./env` file.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this is just a normal vonage application? if so it can be done via the CLI or the API dashboard. I recommend moving the CLI install first then just having a copy and paste for creating a new application

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood, I have made this more generic and changed the link to point to the dashboard 🙏

Copy link
Collaborator

@javiermolsanz javiermolsanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README.md Outdated
You can easily deploy your local branch to Vonage Cloud Runtime (VCR) using the tools in this repository. See https://developer.vonage.com/en/vonage-cloud-runtime/overview for an overview of Vonage Cloud Runtime.

Firstly, install the VCR cli: https://developer.vonage.com/en/vonage-cloud-runtime/getting-started/working-locally#cli-installation and run `vcr configure`.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we're missing one step which is running vcr init to create an instance and an application for VCR to use for deployment. Let's huddle later

@@ -49,3 +49,5 @@ sauce-connect.log
build

/scripts/allLicenseResults.json

vcr.yml
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this may be slightly problematic atm when switching between old branches and new branches and this file will be deleted.
However VCR gives us no way to change the generated vcr.yml file name. The only alternative would be changing the instructions to generate this file, then rename it...

The problem will go away once everyone stays on commits after this one.

dwivedisachin
dwivedisachin previously approved these changes Feb 19, 2025
Copy link
Collaborator

@dwivedisachin dwivedisachin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

javiermolsanz
javiermolsanz previously approved these changes Feb 19, 2025
Copy link
Collaborator

@javiermolsanz javiermolsanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on this one

Copy link
Collaborator

@dwivedisachin dwivedisachin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, tested LGTM!! 🚀

@dwivedisachin dwivedisachin merged commit acb3501 into develop Feb 19, 2025
7 checks passed
@dwivedisachin dwivedisachin deleted the mthomas/VIDCS-3398-local-vcr branch February 19, 2025 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants