WOLFRAM NOTEBOOK

Setup

This section describes how to set up the Wolfram Enterprise Private Cloud (EPC) virtual machine (VM) for testing and development, and how to set up an EPC VM for your own use from official builds. It also includes instructions on how to build cloud code and push it to the EPC VM; this can be used for developing new features and fixing bugs.

Hardware and Infrastructure Requirements

Minimum Requirements for a Standard EPC

  • At least 1 core per kernel
  • 16 GB of RAM minimum for 4 kernels
  • 150 GB of storage space
  • Network connectivity
  • A hypervisor (KVM, VMware, AWS, VirtualBox)
  • A registered domain
  • The ability to add/modify DNS records (authorization)
  • Basic-to-moderate Linux knowledge strongly recommended
  • Hosting Options

  • Wolfram-hosted through Amazon Web Services (AWS)
  • All installation and configuration, including setup, network access and machine specs, are handled by Wolfram EPC support
  • Additional hosting fees incurred
  • On your own hardware or AWS
  • EPC can be hosted on a Kernel-based Virtual Machine (KVM). However, due to the great variety of KVMs in circulation, we cannot provide instructions for every scenario. Users are urged to direct any questions about their own KVM setups to the Technical Support team (see the Chapter 1 section Fully Supported).
  • EPC Builds

    An EPC build is distributed in two forms, OVA files and update tar files. The OVA file is used to create a new EPC virtual machine. To upgrade an existing VM to the next EPC version, you would use the update tar. You can still create a new EPC image from an OVA file at any time, but it will not have configuration or user accounts, nor will it be associated with any data.

    Cluster Management

    Automatic cluster management is a feature new in EPC 1.50.1. It supports a topology of a single master node and a set of compute nodes. The master node runs the services, such as Apache and MySQL, and is also where the configuration for the cloud takes place. The compute nodes host the web application and Wolfram Engines.
    In order to use EPC with automatic cluster management, you will create one VM for each node (master plus compute nodes), installing the EPC OVA on each VM and setting up hostnames for each VM in DNS. You will also need to create a keypair for SSH using ssh-keygen. Once the keys are created, install the private key into the cloud account on the master node and the public key into the cloud account on the other nodes. The EPC code will automatically start a ssh-agent on the master node, but you may need to add your key using the ssh-add command before using the configuration notebook. See the next section for additional information on using the automatic cluster management feature.

    Installation and Configuration

    Using the Configuration Notebook

    If you are running an EPC cluster (i.e. you are using more than one node in your EPC), you will configure your cluster on Slide 2, Network Information, under the section Cluster Nodes. Follow the example there to configure the hostnames and IP addresses for each of the compute nodes you set up earlier. On the last slide of the configuration notebook, the Install Configuration Files button will automatically configure each node in your cluster, and the Restart System Services button will restart all services on each node in your cluster.

    Allocating Kernels

    Kernel allocation is done in the configuration notebook. Since the ideal allocation strategy greatly depends on user requirements, a separate chapter has been devoted to the topic. See Chapter 4, “Allocating Kernel Resources.”

    Optional Packages Requiring Additional Configuration

  • RLink
  • Step 1: in the configuration notebook, slide 8, set "JLinkUseSandbox" to False
  • Step 2: set "JLinkAdditionalReadDirectories" to include the directory where the R client is installed—for example, "JLinkAdditionalReadDirectories" -> {...,"/usr/lib64/R",...}
  • Step 3: open a new notebook and execute the following lines:
  • Needs["RLink"]
  • RLinkResourcesInstall[] (if you do not have these yet)
  • InstallR[]
  • Step 4: check that installation was successful by writing some sample R code:
  • RSet["myVar", 10]
  • REvaluate["myVar"]
  • Python
  • Step 2: add your Python runtime to the "AdditionalReadDirectories" in the configuration notebook
  • Step 4: test Python from a notebook using ExternalEvaluate
  • User-Defined Variables

    Users can make custom variables and packages available for use in EPC development sessions.
    To expose custom variables, add them to the initialization file /usr/share/Mathematica/Kernel/init.m:
    [cloud@master ~]$ cd /usr/share/Mathematica/Kernel
    [cloud@master Kernel]$ sudo vi init.m
    (This is a Wolfram Language file, so you can also edit it from the Mathematica application.)
    Save and close init.m. You can see your new variable in action by opening a new notebook and, for the purposes of this example, evaluating the following:

    User-Defined Packages

    Custom packages can be designated as autoloading, or they can require an explicit call using the Needs or Get keywords. The latter option is advantageous for packages that require a lot of memory, while the former is for packages that are needed in every session.
    To automatically expose a given package for every session and user, copy it into the Autoload folder:
    [cloud@master ~]& cp path/to/package1.nb /usr/share/Mathematica/Autoload/package1.nb
    To make a package available for optional loading with Needs or Get, copy it into the Applications folder:
    [cloud@master ~]& cp path/to/package2.nb /usr/share/Mathematica/Applications/package2.nb
    In either case, the front end will need to be restarted for the loading to take effect and/or for the dependency declarations via Needs/Get to be valid.
    Packages added to these directories are subject to certain formatting constraints; otherwise, they will not be loaded. See the .

    JLink Sandbox

    Wolfram Cloud

    You are using a browser not supported by the Wolfram Cloud

    Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


    I understand and wish to continue anyway »

    You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.