A simple project to deploy and run a Dockerised application

Download

To install a blueprint, follow these steps:

  • Download the selected blueprints to your desktop.
  • Log in to RapidDeploy and go to ‘Menu’ -> ‘Resources’ -> ‘Projects’
  • Click the ‘Upload Project’ button in the top right of the project list panel.
  • Select the file you downloaded and then follow the on-screen instructions!

The link below will download the Docker Deploy blueprint to your desktop

Project overview.

.

Here is a summary of what this project will achieve.

This project is designed to download RapidDeploy from the MidVision website, run a docker build to ‘Dockerize’ the application, and then run it in a container. The server in the project is Linux, but can also be Windows if required.

One target environment is configured in the project (for Linux). We can easily clone this project to add a Windows flavour.

The Docker plugin we are using is based on the Docker command line.

What is preconfigured and demonstrated

The project demonstrates the following configurations:
  • Target server for Linux using ssh connection
  • Configured target for a RapidDeploy image and configuration
  • DockerBuild  task
  • DockerRunContainer  task

Prerequisites

  • You will need Docker installed on any target infrastructures you want to deploy to. You may wish to use the Docker install blueprint to do this.
  • You should have the ability to connect to the target server on port 22 for SSH and port 9090 (to test the RapidDeploy application). Ensure there are no firewall rules blocking access between the RapidDeploy server and the target Docker instances. Port 9090 is opened as part of the orchestration.

 

How to use this project.

  1. Download the project to your desktop by clicking on one of the links. The file will be saved as Docker-RapidDeploy.zip
  2. Log into your RapidDeploy instance as mvadmin.
  3. Navigate to Resources-> Projects.
  4. In the top right hand corner click on the Upload Project button.
  5. Select the zip file you downloaded in step 1.
  6. You are guided through a project import wizard.
  7. Once the project is imported, there are a couple of things you’ll need to do.
    • This project is run on a server definition for an AWS instance. You will need to reconfigure this for your Linux server.
    • Resources -> Servers . Select the Docker-Dev  server definition and amend with your connection details.
    • Save the Server.
    • Now we have saved the server, go to  Resources ->   Projects  and edit the project.
    • Navigate to the Orchestration  and then Data Dictionary tabs. Make any changes for your specific requirements. You might want to change the volume binding for example, for the volumes that will be exposed.
    • Navigate to the    Packages   tab and click the    Create Package    button. A new package is created with a version number. This is the package you’ll deploy later, containing all the environment definitions, actions and paylod to allow the jobs to be run on all defined servers.
  8. Now you can run a new job to the environment of your choice.
    • Navigate to  Resources ->  Projects and select the Targets tab.
    • Select the play button next to the target. The play button here always deploys the latest package to the selected target.
    • Run the job.
    • To see the running job, navigate to Jobs-> Running Jobs .
  9. Once the job completes, navigate to http://[your-ip]:9090/Midvision and log in to RapidDeploy deployed in Docker.
  10. Going further: Make a change, redeploy and see that the change remains.
    • Try uploading a project in this new RapidDeploy instance and saving it.
    • Then try stopping/removing the container and deleting the image.
    • Now re-run the deployment
    • You should see that although you’ve built and deployed a new image to a new container, the project is still there.

Further Reading

The following links will help you gain a deeper understanding of the tasks used in this project:

Reviews

There are no reviews yet.

Be the first to review “Dockerise and Deploy an Application Blueprint”