In this article we will describe in detail the process to migrate all your assets, asset filters, streaming locators, content key policies, streaming endpoints from AMS into MK.IO.
once you move this asset to MK.IO your playback URL for the same asset will be something like this (where only the FQDN part of the URL changes):
1. Your Microsoft Azure user has contributor privileges in the subscription that holds your AMS account (this is to prevent issues down the path of migration)
1. Connecting to Microsoft Azure from your command line:
a. Open a command line in windows or from bash
b. run #az login --use-device-code
d. Now in the command line set the subscription that holds your AMS account as follows: #az account set --subscription <yoursubscriptionid>
You can find the subscriptionid for the above step from the Azure Portal, being on the overview section of your AMS account:
2. set your MK.IO JWT token that will be used to connect with MK.IO in your command line:
a. To do so, first open a web browser and log into
https://mk.io (sign in with Microsoft SSO), click on Sign in on the top right.
c. This should provide you with your user_id and token. Note that this token is valid for 1 year.
d. copy the value of that token (without the " " ) and bring it to your command line and run this: # set MKIO_TOKEN=<PASTEHEREYOURTOKEN> (set will work on windows command line, if you are using other tool like mobaexterm use export MKIO_TOKEN=<PASTEYOURTOKEN>
e. finally confirm the token has been loaded running EITHER: # echo %MKIO_TOKEN%, or # echo $MKIO_TOKEN
you should see the MK.IO token to be used.
3. Running the tool
b. extract the contents into a folder and navigate to this folder from the command line you run the steps above:
c. now you can build up your command to run based on this:
go run main.go --azure-subscription 2a23445a-1234c-4239-adae-f4234685afaa1 --azure-resource-group corytv --azure-account-name corytvams --mediakind-subscription mediakind-eastus --export --import --assets --streaming-locators --asset-filters --content-key-policies --streaming-endpoints
Where:
--azure-subscription, subscription ID we connected to in step 1 above
-- azure-resource-group, you can see this when in the overview window of the AMS account:
--azure-account-name, this is the AMS account name, in the above screenshot is corytvams
--mediakind-subscription, you can find this name when logged in MK.IO on the top right corner:
--export, to export from AMS (you can choose to do this step only and dont do the --import into MK.IO just yet or do it all together as we are doing in this example)
--import, in conjuction with --export it will import what was just exported from AMS in the same command (you can choose to import an specific json exported previously if you like)
--assets, --streaming-locators, --asset-filters --content-key-policies -- streaming-endpoints, are the entities from AMS we will export from AMS and import into MK.IO.
Performance
We have seen exporting from AMS around 4500 assets per minute.
MK.IO accepts 1000 assets import per minute (same rule applies for locators, or other entities).
While the tool is running, you can see progress importing into MK.IO looking into the Dashboard where you can see the number of assets increasing, then once assets are finished we continue with content key policies or streaming policies as they are required for locators and we finish with locators and streaming endpoints.