customized cloudera-parcel
Python Shell PowerShell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
source/meta
.gitattributes
.gitignore
LICENSE.txt
README.md
build.ps1
build.sh
centos.Dockerfile
debian.Dockerfile
extract_from_docker.ps1
extract_from_docker.sh
ubuntu.Dockerfile

README.md

R-PARCEL

This repository is aim to create R parcel.

Prerequisity

You need to install Docker. I confirmed with Docker community edition on Ubuntu.

Simple way to build Parcels

After installation of Docker, run:

$ ./build.sh

You will find parcels in ./target directory.

Manual build

Preparation

Prepare R environment using miniconda.

$ mkdir -p ./target/CONDAR-3.4.1/lib
$ cp -r ./source/meta ./target/CONDAR-3.4.1/
# (Option) Modify meta/parcel.json if needed
# $ sed -i s/el7/el6/g ./target/CONDAR-3.4.1/meta/parcel.json
$ docker build -t chezou/condar:centos7 -f centos7.Dockerfile .  
# Open another terminal and find your container.
$ docker run -it -t chezou/condar:centos7 /bin/bash
$ docker ps
$ docker cp -L <containerId>:/opt/conda/envs/R_env ./target/CONDAR-3.4.1/lib/conda-R
# Terminate docker process

Modify meta data

In current version, you should modify version info in json.

Tar your Parcel

$ cd target
$ tar cvzf  CONDAR-3.4.1-el7.parcel CONDAR-3.4.1 --owner=root --group=root

validate, create metadata.json

I borrowed validator.jar and make_manifest.py from cm_ext repo.

How to validate json and parcel

See also: How to use validator.jar

$ java -jar lib/validator.jar <args>

At least, you should pass parcel test:

$ java -jar lib/validator.jar -f target/CONDAR-3.4.1-el7.parcel

How to create manifest.json

Run following command, then you'll get ./target/manifest.json.

$ python ./lib/make_manifest.py ./target

Put the Parcels into your http server

Upload every ./target/*.parcel and ./target/manifest.json to the same directory on http server.

You can put Parcels on S3. It doesn't need to have index.html for directory listing.

FAQ

How to control R version?

This parcel use Miniconda to install R. You can controll R version with setting r-essentials' version.