Octopus Deploy can help with your complex deployment scenarios, but it can also deploy simple projects.
This section walks you through the simplest deployment possible to help familiarize you with the process and the Octopus Web Portal.
The steps in this procedure are completed in an Octopus Cloud instance, but the process is almost identical in self-hosted instances of Octopus Server.
Octopus organizes the servers and services where you deploy your software into environments. Typical environments are Dev, Test, and Production, and they represent the stages of your deployment pipeline.
Add an environment
- To create an environment, in the Octopus Web Portal, navigate to Infrastructure ➜ Environments and click ADD ENVIRONMENT.
- Give your new environment a meaningful name, for instance, Test, and click SAVE.
You now have your first environment.
Projects are used to collect all the assets that make up your deployment processes. To deploy our simple hello world script, we first need a project.
Create a project
- Navigate to the Projects tab, and click ADD PROJECT.
- Give the project a name, for instance, Hello, world, and click Save.
You now have your first project and are ready to define your deployment process.
The deployment process is the steps the Octopus Server orchestrates to deploy your software. For our simple hello world script, we will only have one step.
Define the deployment process
- From the Hello world project you created in the previous section, click DEFINE YOUR DEPLOYMENT PROCESS.
- Click ADD STEP.
- Select the Script tile to filter the types of steps.
- Scroll down and click ADD on the Run a Script tile.
- Accept the default name for the script and leave the Enabled check-box ticked.
- In the Execution Location section, select Run once on a worker.
- Scroll down to the Script and enter the following PowerShell script in the Inline Source Code section:
Write-Host "Hello, World!"
- Click SAVE.
You have created your first deployment process. Next, we'll create a release and deploy it.
Releases and deployments
A release is a snapshot of the deployment process and the associated assets (packages, scripts, variables) as they existed when the release was created. Our hello world deployment process only has one step that executes the script we entered in the previous section.
When you deploy the release, you are executing the deployment process with all the associated details, as they existed when the release was created.
Create and deploy a release
- Click CREATE RELEASE.
- The release is created and given a version number. There is a space to add release notes. Click SAVE.
- To deploy this version of the release, click DEPLOY TO TEST....
The next screen gives you the details of the release you are about to deploy:
- To deploy the release, click Deploy.
- The next screen displays a task summary. If you click the TASK LOG, you'll see the steps Octopus took execute your hello world script.
Because we didn't define any deployment targets for the Test environment, Octopus leased a dynamic worker (a machine that execute tasks on behalf of the Octopus Server) that was then used to execute the hello world script.
Need support? We're here to help.