-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
2922920
to
dd95854
Compare
@@ -24,7 +24,8 @@ | |||
"dotenv": "^16.0.3", | |||
"express": "^4.21.2", | |||
"form-data": "^4.0.1", | |||
"opentok": "^2.16.0" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this 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
I just tested it and I was able to deploy to my instance. 🚀 |
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`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CLI is not installed via NPM
https://developer.vonage.com/en/vonage-cloud-runtime/getting-started/working-locally#cli-installation
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left one comment regarding vcr init https://developer.vonage.com/en/vonage-cloud-runtime/getting-started/working-locally#using-the-cli let's catch up later
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`. | ||
|
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!
There was a problem hiding this 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
bf0fbf1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, tested LGTM!! 🚀
What is this PR doing?
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
(notmain
).[👎] 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?