This is a simple ToDo application to show how to deploy a MEAN application using Bitnami Stacksmith
-
Go to stacksmith.bitnami.com.
-
Create a new application and select the
Node.js with NoSQL DB (MongoDB)
stack template. -
Select the targets you are interested on (AWS, Kubernetes,...).
-
Compress the app/ folder from this repo and upload it as application files:
git clone https://github.com/bitnami-labs/stacksmith-nodejs-with-nosql cd stacksmith-nodejs-with-nosql/todo tar czf app.blue.tar.gz app
You can also download app.blue.tar.gz
from the releases page.
- Select
Git repository
for the application scripts and paste the URL of this repo. Usemaster
as theRepository Reference
. - Click the Create button.
- Wait for app to be built and deploy it in your favorite target platform.
Stacksmith will compare the latest commit for a reference (e.g. new commits made to a branch) against the last commit used during packaging. If there are any new commits available, these will be available to view within the Repository Details
pane in the application history. If you choose to repackage your application, these newer commits will be incorporated and used during the packaging.
-
Change something on the app. As an example you can apply the patch
change_color.patch
that changes the color of the task counter:cd stacksmith-nodejs-with-nosql/todo git apply ./change_color.patch tar czf app.orange.tar.gz app
You can also download app.orange.tar.gz
from the releases page.
- Go to your app stacksmith.bitnami.com
- Click on Edit configuration, delete
app.blue.tar.gz
and uploadapp.orange.tar.gz
- Click Update.
- Wait for the new version to be built and re-deploy it in your favorite target platform.
Stacksmith will use the latest Application Scripts from the GitHub repository.
-
Go to stacksmith.bitnami.com, create a new application and select the
Node.js with NoSQL DB (MongoDB)
stack template. -
Install Stacksmith CLI and authenticate with Stacksmith.
-
Create a tarball with your application code. You can use the sample demo from releases:
wget https://github.com/bitnami-labs/stacksmith-nodejs-with-nosql/releases/download/v1/app.blue.tar.gz
-
Edit the
Stackerfile.yml
, update theappId
with the URL of your project and the name ofuserUploads
. -
Run the build for a specific target like
aws
ordocker
. E.g.stacksmith build --target docker
-
Wait for app to be built and deploy it in your favorite target platform.
-
Change the app and build a new tarball. You can use the second example from releases:
wget https://github.com/bitnami-labs/stacksmith-nodejs-with-nosql/releases/download/v1/app.orange.tar.gz
-
Update the version and the tarball name in the
Stackerfile.yml
. -
Run the build for a specific target like
aws
ordocker
. E.g.stacksmith build --target docker
-
Wait for the new version to be built and re-deploy it in your favorite target platform.
In the stacksmith/user-scripts
folder, you can find the required scripts to build and run this application:
This script takes care of installing the application and its dependencies. It performs the next steps:
- Adds the system user that will run the application.
- Uncompress the application code to the
/opt/app
folder. - Adjust the application files permissions.
- Install dependencies.
This script takes care of configuring the application.
This script just starts the application with the proper user.