Git Product home page Git Product logo

azurecontainers's Introduction

AzureContainers

CRAN Downloads Build Status

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")

azurecontainers's People

Contributors

hongooi73 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.