Skip to content

Create New Application

Ahmet Oğuz Mermerkaya edited this page Jun 2, 2021 · 15 revisions

Ant Media Server supports application deployment on the fly. This feature actually resolves the multi-tenancy problem for online video platforms.Ant Media Server has 2 built-in applications. Users want to able to use different settings for each application and able to specify the name of the application.

Because of that, customers want to add/create new applications. There are several ways to create/delete application. Let us tell how to do that.

Web Panel

The fastest and easies way to create new applications on the web panel.

Step 1

Login to the web panel & Click the New Application

Step 2

Enter application name and click the Create button

The good thing is that if the server is cluster mode, it will deploy the application to all nodes in the cluster. If the application is deleted, it'll also be deleted in all nodes.

Shell Script

There a script that creates new applications in Ant Media Server easily. You just need to type a few simple commands.

Let’s have a look at the steps:

Step 1

Go to the folder where Ant-Media-Server is installed. Default directory is /usr/local/antmedia

cd /usr/local/antmedia

Step 2

create_app.sh usage in below.

sudo ./create_app.sh -n applicationName -p AMS-Installation-Directory

For example:

sudo ./create_app.sh -n streamHive -p /usr/local/antmedia

Step 3

Restart Ant Media Service

sudo service antmedia restart

*This feature is available in Ant Media Server 1.9.0+ versions.

Rest Method

Create Application

Web panel has the following REST method to create application.

@POST
@Path("/applications/{appName}")
@Produces(MediaType.APPLICATION_JSON)

It means that you can call the following method to create an application with curl. Please take a look at the answer here to learn how to access web panel REST methods programmatically

curl -X POST -H "Content-Type: application/json" "https://{YOUR_SERVER_ADDRESS}:5443/rest/v2/applications/myapp"

Delete Application

Web panel has the following REST Method to delete the application.

@DELETE
@Path("/applications/{appName}")
@Produces(MediaType.APPLICATION_JSON)

Call the following method to delete an application(apptest) with curl.

curl -X DELETE -H "https://{YOUR_SERVER_ADDRESS}:5443/rest/applications/apptest"

User Guide

Reference

Troubleshooting

Draft

Proposals

Clone this wiki locally