What you’ll learn
- how to upgrade Webiny from 5.0.0-beta.4 to 5.0.0
This is mainly because of the changes introduced by the
pulumi.zip file, mentioned below. Once you paste the code into your project, the first production environment deployment will:
- deploy a custom Virtual Private Network (VPC)
- deploy your ElasticSearch cluster into multiple availability zones (AZs)
If you want to continue deploying the same infrastructure you already had in place for the production environment, make sure to comment out or remove the following
In any case, if you have any additional questions or concerns, please don't hesitate to send us a message via our community Slack channel.
This guide contains many manual steps. If the circumstances allow it, we recommend you create a new Webiny 5.0.0 project from scratch.
If you still want to upgrade your project manually, follow the steps below in the exact order.
All file paths in the instructions below are considered to start in your project root directory.
Webiny now works with yarn 2 exclusively. It's a big improvement over yarn 1.x in both speed and reliability when it comes to package upgrades.
- run the following command in the root of your Webiny project:
nodeLinker: node-modulesconfig option.
run the following to migrate the
Now we need to apply some changes to the project itself:
package.jsonand add the following
dependencies(keep the existing values, and add the new ones in):
dependenciesin the following files:
apps/theme/package.jsonand remove the
download dynamoToElastic.zip, unzip it, and put into
api/code/dynamoToElastic. You may need to create this folder yourself, depending on how you extracted the archive. The end result should look like this:
In the next step, don't mistake
pulumi for your
.pulumi folder! We want to replace the infrastructure definitions, but keep the state files.
- download pulumi.zip, unzip it, and completely replace your existing
api/pulumifolder with the one in the archive (don't worry, your existing infrastructure will be intact). The end result should look like this:
api/code/graphql/src/index.tsand replace the contents of it with the following:
edit the following files and remove the
webiny.root.jsand add the following to the
pluginsarray (these are the new scaffolding plugins 🎉):
- run the following command to remove all
node_modulesfrom your project:
- upgrade Webiny packages to
Congratulations! 🎉 This is all you need to do with your project files. Now you can deploy your project, open your
admin app and go through the upgrade wizard which will migrate your data and Elasticsearch indexes.
If you plan to develop your own packages, and run Jest tests, you'll want to apply these changes as well:
DEBUG=trueto enable log streaming to your browser and add extra debug logs to CloudWatch
jest.config.jsand replace the entire file contents with the following:
- create a
jest-es-config.jsfile and put this inside: