The following setup steps should result in a running Migration tool
- Build the binary according to the README
- Copy the binary to your devvm
The following steps will setup Azure access and select the desired accounts to migrate
- Set account to the desired subscription. Using the terminal run
az account set --subscription mkio-dev
- Get AMS Account Name, SubscriptionID and Resource Group of the AMS from the UI
- Login to the Azure Portal
- Navigate to your AMS's overview page to get this data
- Example: https://portal.azure.com/#@mediakind.com/resource/subscriptions/29628ffc-5d07-4af3-88a8-3f710582a73b/resourceGroups/ams-test/providers/Microsoft.Media/mediaservices/amstest/overview
- Using an Incognito or Private Browser
- Log into mk.io UI
- Get the mk.io subscription name from the dropdown in the top pane
- Get the login token mk.io Token
- In terminal, export the token as an environment variable
export MKIO_TOKEN="$token_from_step_3"
At the moment we don't automatically migrate the StorageAccount access, or StreamingEndpoints. These will need to be added manually to mk.io.
StorageAccount must be in place before the tool runs.
- Log into the Azure Portal's AMS page
- Select Settings.Storage Accounts from the side pane
- These storage accounts will need to be added to mk.io before we can run the migration tool
- For each storage account:
- Record the Name
- In the storage account select
Security + networking
->Shared access signature
from the side pane - Select all three
Allowed resource types
to have the correct - Make sure your End Time is appropriate.
- Click on
Generate SAS and connection string
button. - Record the BlobEndpoint in the
Connection string
setting. It should look similar tohttps://amstestrns0.blob.core.windows.net/
- Record the entire
SAS token
- Navigate to the appropriate subscription in the mk.io UI
- Select
Storage Accounts
in the side menu - Select
+ Add Storage Account
on top - Use Information recorded in step 4 to create a storage account.
- At the moment this will only work if naming matches exactly between AMS and mk.io
A streaming Endpoint is needed to output video. Imports will work without this, but we will not be able to test.
- Navigate to the appropriate subscription in the mk.io UI
- Select
Streaming Endpoints
in the side menu - Select
+ Create Streaming Endpoint
on top - Create a streaming Endpoint
This assumes all of the setup steps above were completed successfully.
The script dev/removeAssets.sh
will delete all assets from the migration
subscription in mk.io
I would suggest testing out assets beforehand to make sure you have one that works. I used liveEvent-test-alex-20230901-192728
for my demo. Ideally the asset should have a StreamingLocator with Streaming Policy = Predefined_ClearStreamingOnly
.
- Login to AMS and show the list of assets
- Select an asset and play a sample video
- Log into mk.io and show an empty list of assets
- Run the Migration
- Show Assets in mk.io
- Select the same asset as in AMS
- Play the sample video of the asset
Run the migration using the information gathers in Setup
./mkio-ams-migration --azure-subscription 29628ffc-5d07-4af3-88a8-3f710582a73b --azure-resource-group ams-test --azure-account-name amstest --mediakind-import-subscription migration --export --import --assets --streaming-locators --asset-filters --content-key-policies --streaming-endpoints