R package for working with containers in Azure: ACI, ACR, AKS
Перейти к файлу
microsoft-github-policy-service[bot] 092248c53e Microsoft mandatory file 2023-01-24 16:02:39 +00:00
.github/workflows update workflow 2021-01-12 05:45:44 +11:00
R fix #16, add secure_env_vars aci arg 2021-07-06 01:25:42 +10:00
man fix #16, add secure_env_vars aci arg 2021-07-06 01:25:42 +10:00
tests fix #16, add secure_env_vars aci arg 2021-07-06 01:25:42 +10:00
vignettes also mention RestRserve vignette 2021-07-09 15:32:41 +10:00
.Rbuildignore switch to github actions 2020-10-14 07:30:43 +11:00
.gitattributes Add .gitignore and .gitattributes. 2018-08-22 11:42:17 +08:00
.gitignore init package 2018-08-22 21:47:42 +08:00
AzureContainers.Rproj Add project files. 2018-08-22 11:42:19 +08:00
AzureContainers.rxproj Add project files. 2018-08-22 11:42:19 +08:00
AzureContainers.sln Add project files. 2018-08-22 11:42:19 +08:00
CONTRIBUTING.md add contrib 2019-05-22 22:00:25 +10:00
DESCRIPTION bump ver no for release 2021-07-09 03:30:07 +10:00
LICENSE change license formatting for cran 2018-11-14 09:26:40 -08:00
LICENSE.md change license formatting for cran 2018-11-14 09:26:40 -08:00
NAMESPACE AKS features (#12) 2020-04-28 21:52:05 +10:00
NEWS.md bump ver no for release 2021-07-09 03:30:07 +10:00
README.md use correct badge 2021-01-23 07:53:35 +11:00
SECURITY.md Microsoft mandatory file 2023-01-24 16:02:39 +00:00

README.md

AzureContainers

CRAN Downloads R-CMD-check

A package for working with Azure Container Registry (ACR), Azure Kubernetes Service (AKS) and Azure Container Instances (ACI). Extends the Azure Resource Manager interface provided by the AzureRMR package.

AzureContainers lets you build and deploy containerised services in R, using Docker and Kubernetes. For full functionality, you should have Docker installed, as well as the kubectl and helm commandline tools. Otherwise it is relatively lightweight, requiring neither Powershell nor Python.

Note that AzureContainers can talk to any Docker registry that uses the V2 HTTP API, not just those created via ACR. Similarly, it can interface with Kubernetes clusters anywhere, not just those created via AKS.

The primary repo for this package is at https://github.com/Azure/AzureContainers; please submit issues and PRs there. It is also mirrored at the Cloudyr org at https://github.com/cloudyr/AzureContainers. You can install the development version of the package with devtools::install_github("Azure/AzureContainers").

Example workflow

Here is a sample R workflow to package up an R model as a container, deploy it to a Kubernetes cluster, and expose it as a service.

library(AzureContainers)

az <- AzureRMR::get_azure_login()
resgroup <- az$
    get_subscription("<subscription_id>")$
    create_resource_group("myresgroup", location="australiaeast")

# create container registry
acr <- resgroup$create_acr("myacr", location="australiaeast")

# create Docker image from a predefined Dockerfile
call_docker("build -t newcontainer .")

# get registry endpoint, upload image
reg <- acr$get_docker_registry()
reg$push("newcontainer")


# create Kubernetes cluster with 2 nodes
aks <- resgroup$create_aks("myakscluster",
    location="australiaeast",
    agent_pools=agent_pool("pool1", 2))

# give the cluster pull access to the registry
acr$add_role_assignment(aks, "Acrpull")

# get cluster endpoint, deploy from ACR to AKS with predefined yaml definition file
clus <- aks$get_cluster()
clus$create("model1.yaml")
clus$get("service")