# Getting to Production

This guide assumes you have gone through the Quick Start and deployed an application to the dev environment. To complete this guide you need to have Maven 3.6.1 and Java 11 installed.

Also try the album-recommendation-searcher guide - this is a complete production deployment guide.

To be able to deploy an application to the prod environment, the application needs tests that validate it. These tests are executed automatically on each deployment - see Automated Deployments.

Below we are using the files that fit with album-recommendation, the application used in the Getting Started guide.

1. Add a pom.xml file to the application root. This is the Maven project configuration, and is needed to build with the Vespa Cloud test framework. See this example.

2. Update the tenant and application properties in pom.xml to match the names for your tenant and application.
...
<properties>
...
<tenant>MYTENANT</tenant>
<application>MYAPP</tenant>
</properties>
...

3. Add the tests that build the test framework. These tests reside in the src/test/java directory of the application. You can copy the sample tests that are in this directory.

Use deployment.xml to configure production deployments. To deploy the application to the prod.aws-us-east-1c zone, add deployment.xml, together with services.xml in src/main/application.

<deployment version="1.0">
<prod>
<region active="true">aws-us-east-1c</region>
</prod>
</deployment>


### Deploying the application

Now you are ready to build and deploy the application:

1. Add the compile version information to the application package:
$mvn clean vespa:compileVersion -DapiKeyFile=$HOME/Downloads/TENANTNAME.pem

2. Compile the application package with test artifacts:
$mvn package \ -Dvespa.compile.version="$(cat target/vespa.compile.version)"

3. Submit the application package to Vespa Cloud for deployment:
$mvn vespa:submit -DapiKeyFile=$HOME/Downloads/TENANTNAME.pem


The application is now being deployed - track progress of the deployment job in the Vespa Cloud Console.

### Next steps

The Vespa Cloud application is now running in a production zone. Congratulations! After this you can further enhance the production application:

### Removing a production instance

Follow the guide at Deleting an application to remove instances or applications.