From 73dedefdf97ef630f07c0040f92ae8fb00b47f56 Mon Sep 17 00:00:00 2001 From: Abhi Keshav Date: Fri, 23 Mar 2018 21:12:21 -0700 Subject: [PATCH] docker --- Dockerfile | 11 +++++++++++ README.md | 11 +++++++++++ sdk/go/README.md | 12 +++++++++++- sdk/go/core/docsgen/getting_started.rst | 10 ++++++++++ sdk/python/README.rst | 13 +++++++++++++ sdk/python/core/docsgen/getting_started.rst | 10 ++++++++++ 6 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..62b505c97 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM ubuntu:xenial + +MAINTAINER http://ydk.io + +COPY . /root/ydk-gen + +RUN echo 'Installing dependencies' + +WORKDIR /root/ydk-gen + +RUN /bin/bash -c './test/dependencies_ubuntu_basic.sh && pip install -r requirements.txt && ./generate.py --libydk && make -C gen-api/cpp/ydk/build install && ./generate.py --core --python && pip install gen-api/python/ydk/dist/ydk*.tar.gz' diff --git a/README.md b/README.md index 787fb0772..06e2fd106 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/6e111527081b48e1b2252c3562e08a3b)](https://www.codacy.com/app/ydk/ydk-gen?utm_source=github.com&utm_medium=referral&utm_content=CiscoDevNet/ydk-gen&utm_campaign=badger) [![License](https://cloud.githubusercontent.com/assets/17089095/19458582/dd626d2c-9481-11e6-8019-8227c5c66a06.png)](https://github.com/CiscoDevNet/ydk-gen/blob/master/LICENSE) [![Build Status](https://travis-ci.org/CiscoDevNet/ydk-gen.svg?branch=master)](https://travis-ci.org/CiscoDevNet/ydk-gen) [![codecov](https://codecov.io/gh/CiscoDevNet/ydk-gen/branch/master/graph/badge.svg)](https://codecov.io/gh/CiscoDevNet/ydk-gen) +[![Docker Automated build](https://img.shields.io/docker/automated/jrottenberg/ffmpeg.svg)](https://hub.docker.com/r/ydkdev/ydk-gen/) ![ydk-logo-128](https://cloud.githubusercontent.com/assets/16885441/24175899/2010f51e-0e56-11e7-8fb7-30a9f70fbb86.png) @@ -16,6 +17,7 @@ YANG Development Kit (Generator) - [Linux](#linux) - [macOS](#macos) - [Windows](#windows) +- [Docker](#Docker) - [Installation](#installation) - [Setting up your environment](#setting-up-your-environment) - [Clone ydk-gen and install the requirements](#clone-ydk-gen-and-install-the-requirements) @@ -60,6 +62,15 @@ The output of ydk-gen is either a core package, that defines services and provid # Backward compatibility Please see [this page](http://ydk.cisco.com/py/docs/backward_compatibility.html) for details on some backward incompatible changes introduced as part of the 0.6.0 release +# Docker + +A [docker image](https://docs.docker.com/engine/reference/run/) is automatically built with the latest ydk-gen installed. This be used to run ydk-gen without installing anything natively on your machine. + +To use the docker image, [install docker](https://docs.docker.com/install/) on your system and run the below command. See the [docker documentation](https://docs.docker.com/engine/reference/run/) for more details. + +``` +docker run -it ydkdev/ydk-gen +``` # System requirements Please follow the below instructions to install the system requirements before installing YDK-Py/YDK-Cpp. **Please note** that if you are using the latest ydk-gen master branch code, you may not be able to use the below prebuilt `libydk` binaries. You need to [build libydk from source](#second-step-generate--install-the-core) after installing the below requirements: diff --git a/sdk/go/README.md b/sdk/go/README.md index f14dae4c6..3ff770015 100644 --- a/sdk/go/README.md +++ b/sdk/go/README.md @@ -1,4 +1,6 @@ [![Build Status](https://travis-ci.org/CiscoDevNet/ydk-go.svg?branch=master)](https://travis-ci.org/CiscoDevNet/ydk-go) +[![GoDoc](https://godoc.org/github.com/CiscoDevNet/ydk-go?status.svg)](https://godoc.org/github.com/CiscoDevNet/ydk-go) +[![Docker Automated build](https://img.shields.io/docker/automated/jrottenberg/ffmpeg.svg)](https://hub.docker.com/r/ydkdev/ydk-go/) ![ydk-logo-128](https://cloud.githubusercontent.com/assets/16885441/24175899/2010f51e-0e56-11e7-8fb7-30a9f70fbb86.png) @@ -10,6 +12,7 @@ - [Overview](#overview) - [How to Install](#how-to-install) + - [Docker](#docker) - [System Requirements](#system-requirements) - [Installing](#installing) - [Documentation and Support](#documentation-and-support) @@ -40,9 +43,16 @@ Centos (Fedora-based) - The following packages must be present in your system be ``` $ sudo yum install epel-release -$ sudo yum install libxml2-devel libxslt-devel libssh-devel libtool gcc-c++ pcre-devel cmake +$ sudo yum install libxml2-devel libxslt-devel libssh-devel libtool gcc-c++ pcre-devel cmake libstdc++-static git + +# Upgrade gcc to > 5.* +$ yum install centos-release-scl -y > /dev/null +$ yum install devtoolset-4-gcc* -y > /dev/null +$ ln -sf /opt/rh/devtoolset-4/root/usr/bin/gcc /usr/bin/gcc +$ ln -sf /opt/rh/devtoolset-4/root/usr/bin/g++ /usr/bin/g++ $ sudo yum install https://devhub.cisco.com/artifactory/rpm-ydk/0.7.0/libydk-0.7.0-1.x86_64.rpm + ``` **Mac** diff --git a/sdk/go/core/docsgen/getting_started.rst b/sdk/go/core/docsgen/getting_started.rst index 10e3d72d1..d39c89c03 100644 --- a/sdk/go/core/docsgen/getting_started.rst +++ b/sdk/go/core/docsgen/getting_started.rst @@ -8,6 +8,16 @@ Overview The YANG Development Kit (YDK) is a Software Development Kit that provides API's that are modeled in YANG. The main goal of YDK is to reduce the learning curve of YANG data models by expressing the model semantics in an API and abstracting protocol/encoding details. YDK is composed of a core package that defines services and providers, plus one or more module bundles that are based on YANG models. +Docker +====== + +A `docker image `_ is automatically built with the latest ydk-go installed. This be used to run ydk-go without installing anything natively on your machine. + +To use the docker image, `install docker `_ on your system and run the below command. See the `docker documentation `_ for more details:: + + docker run -it ydkdev/ydk-go + + System Requirements =================== diff --git a/sdk/python/README.rst b/sdk/python/README.rst index 1b35df28d..935c5f9a6 100644 --- a/sdk/python/README.rst +++ b/sdk/python/README.rst @@ -1,6 +1,10 @@ .. image:: https://travis-ci.org/CiscoDevNet/ydk-py.svg?branch=master :target: https://travis-ci.org/CiscoDevNet/ydk-py +.. image:: https://img.shields.io/docker/automated/jrottenberg/ffmpeg.svg + :alt: Docker Automated build + :target: https://hub.docker.com/r/ydkdev/ydk-py/ + ============================= YANG Development Kit (Python) ============================= @@ -16,6 +20,15 @@ Backward Compatibility ---------------------- Please see `the release notes `_ and `documentation `_ for details on some backward incompatible changes introduced as part of the 0.6.0 release. +Docker +------ + +A `docker image `_ is automatically built with the latest ydk-py installed. This be used to run ydk-py without installing anything natively on your machine. + +To use the docker image, `install docker `_ on your system and run the below command. See the `docker documentation `_ for more details:: + + docker run -it ydkdev/ydk-py + System Requirements ------------------- diff --git a/sdk/python/core/docsgen/getting_started.rst b/sdk/python/core/docsgen/getting_started.rst index ab9dc37f5..519256076 100644 --- a/sdk/python/core/docsgen/getting_started.rst +++ b/sdk/python/core/docsgen/getting_started.rst @@ -8,6 +8,16 @@ Overview The YANG Development Kit (YDK) is a Software Development Kit that provides API's that are modeled in YANG. The main goal of YDK is to reduce the learning curve of YANG data models by expressing the model semantics in an API and abstracting protocol/encoding details. YDK is composed of a core package that defines services and providers, plus one or more module bundles that are based on YANG models. +Docker +====== + +A `docker image `_ is automatically built with the latest ydk-py installed. This be used to run ydk-py without installing anything natively on your machine. + +To use the docker image, `install docker `_ on your system and run the below command. See the `docker documentation `_ for more details:: + + docker run -it ydkdev/ydk-py + + System Requirements =================== Please follow the below instructions to install the system requirements before installing YDK-Py: