Skip to content

claudioclutter/mdma

Repository files navigation

MDM Agent

Mdma helps you deploy an iOS app to many devices at scheduled times with SimpleMDM.

The source code is available on GitHub.

Maintainability Tests

After setting up the right groups on SimpleMDM, you can do the following:

buildnew

[1] Upload a new build for an iOS app and decide when it should be pushed to devices

home

[2] Check the status of every pending, scheduled, and completed push

devices

[3] Browse the list of all devices to check the current version of the app

How it works

The app is hosted on Heroku and relies on one job run by Heroku Scheduler every 10 minutes. bundle exec rake deploys:enqueue checks whether any build needs to be deployed soon and adds to the queue.

A separate job is run on Heroku Scheduler every day. bundle exec rake devices:fetch fetches the list of devices with the latest app version.

How to contribute

Whenever a new PR is opened, a new Review App is created on Heroku, where you can test your code. The Review App uses a test app called Ugly Sweater with a test device group. Test your features on the review app and make sure that Code Climate is happy, then merge.

How to configure

In order to use mdma, the following environment variables need to be set:

  • MDMA_APP_ID: The SimpleMDM ID of the app to push
  • MDMA_APP_GROUP_ID: The SimpleMDM ID of the app group that identifies the devices to push to
  • MDMA_APP_IDENTIFIER: The unique identifier of the iOS app
  • RAILS_MASTER_KEY: The key to decrypt the credentials stored in config/credentials.yml.enc

The following environment variables are optional:

  • GITHUB_PROJECT: The GitHub "username/project" path to fetch release notes from
  • SLACK_CHANNEL: The Slack channel to post notifications to (defaults to #deploys)

For completeness, these are the credentials stored in the app:

aws:
  access_key_id: "[Access key for an S3 Bucket to upload builds to]"
  secret_access_key: "[Access secret for an S3 Bucket to upload builds to]"

simple_mdm:
  key: "[SimpleMDM API key]"

google:
  client_id: "[Google app Client ID to log into the app]"
  client_secret: "[Google app Client Secret to log into the app]"

github:
  username: "[Username of a GitHub account with read access to clutter/clutter-ios-wms]"
  token: "[Personal access token for the account to read the releases for that app]"

slack:
  token_url: "[Slack token URL to send build notifications to Slack]"

About

Client for SimpleMDM API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors