Building Your First Fleet with Low-Code Library Blueprints
Overviewβ
In this tutorial, you'll walk through the steps required to set up a very simple Fleet that contains two Vessels.
- A Vessel, built with a Blueprint, that downloads a CSV file from a website
- A Vessel, built with a Blueprint, that emails the contents of the CSV file.
By the end of the tutorial, you will know how to:
- Set up a Vessel with a Blueprint
- Connect Vessels together as part of a Fleet
- Use a Fleet to access files created upstream
Stepsβ
Step 1 - Accessing the Fleet Builderβ
Using the sidebar, click on New Fleet to begin building your new Fleet.
Step 2 - Building the Fleetβ
There are two options for creating a new Fleet: The Visual editor and the YAML editor. This tutorial will focus on using the Visual method. The YAML Editor will be addressed in a different set of tutorials.
Build Vessel to Download File via HTTPβ
Navigate down to the HTTP dropdown and click it. It will expand the Blueprints that are available to use for HTTP.
Click the Blueprint named Download File from URL to Shipyard. This creates a new Vessel and immediately opens the edit pane for that Vessel on the left side of the screen.
Next to the HTTP icon, click the pencil icon and remove the automatically generated name and type Download Slinky Dog Dash Ride Data.
In the File URL field type
https://cdn.touringplans.com/datasets/slinky_dog.csv
In the File Name field type
slinky_dog_dash.csv
In the Folder Name field type
disney_world_wait_times
Build Vessel to Email a Fileβ
- Go to the canvas by clicking off the edit pane.
+ Add Vessel
to add another Vessel to the Fleet.- Search for email using the search bar at the top. Click on Send Message with File
- Next to the Email icon, click the pencil icon and remove the automatically generated name and type Send Slinky Dog Dash Data via Email.
- Fill out fields with the following values:
Name | Value |
---|---|
Send Method | TLS |
SMTP Host | smtp.gmail.com |
SMTP Port | 587 |
Username | Leave blank and use the default |
Password | Leave blank and use the default |
Sender Address | Leave blank and use the default |
Sender Name | |
TO | YOUR EMAIL HERE |
CC | |
BCC | |
Subject | Slinky Dog Dash Wait Times |
Message | Here's the most recent wait times for Slinky Dog Dash! |
File Name Match Type | Exact |
File Name | slinky_dog_dash.csv |
Folder Name | disney_world_wait_times |
Include Shipyard Footer? | β |
- Click and drag from a circle on the Download Slinky Dog Dash Ride Data Vessel towards a circle on the Send Slinky Dog Dash Data via Email Vessel.
It is possible that the Vessels are stacked on top of each other or placed in a spot that is not visually pleasing. You can always drag Vessels by holding your left mouse click button on the Vessel and moving it wherever you would like.
This will connect the two Vessels, allowing one to be triggered by the other. Additionally, this allows files created upstream (Download Slinky Dog Dash Ride Data) to be accessed by the Vessel that lives downstream (Send Slinky Dog Dash Data via Email).
Step 3 - Update Fleet Nameβ
Click on the pencil icon in the header and rename your Fleet to Download File from Webpage and Email to User.
Notice that the "Default" project is pre-selected.
Click the Save & Finish button at the bottom. You should now see the following screen:
By default, every Fleet and every Vessel you create will send error notifications to your email. You can always update this as needed.
After a Vessel is added to a Fleet and saved, the project cannot be changed. Always make sure that the proper project is selected when creating a new Fleet
Step 4 - Running the Fleet On Demandβ
On the success page, click the Run your Fleet button.
You'll be redirected to a Fleet Log page as your Fleet runs. This page will refresh automatically as the Fleet runs. Wait until you see both Vessels as green bars, indicating that they completed successfully.
Click on the Log ID or the bar graph for the Download Slinky Dog Dash Ride Data Vessel. Your Log ID will be different than the one shown below.
- In the output, you should be able to see that the file was successfully downloaded and the size of the downloaded file.
- Go check your email. You should also see a message that contains the ride data.
You've successfully created and verified a Fleet that shares files between two Vessels built with a Blueprint!
A Fleet can always be run by clicking the Run Now button on the top right corner of the Fleet builder.
Further Experimentationβ
Now that you've got the basics down, experiment on your own with a few changes to make sure you understand how Fleets allow Vessels to share files. Some suggestions to get you started:
- Create an additional Vessel that downloads the ride times from a different ride. How will you need to set this up to ensure both files get uploaded in the same email?
- Create an intermediary Vessel that renames the file after Download Slinky Dog Dash Ride Data and before Send Slinky Dog Dash Data via Email. How will you need to adjust things to ensure that Send Slinky Dog Dash Data via Email run successfully? How about if you create the file in a directory?
- Use the Slack blueprint called Send Message to send a message saying that the download the email process completed successfully.
- Create a Vessel using a Blueprint from the Blueprint Library that uploads the file to your storage solution of choice (S3, Google Cloud Storage, Dropbox, etc.) at the same time the email delivers. Can you successfully get the file delivered to your own storage solution?