|
| 1 | +# Solaris Application Container Configuration |
| 2 | + |
| 3 | +Solaris application containers can be configured using the following properties, all of the below properties have mappings to properties specified under zonecfg(1M) man page, except milestone. |
| 4 | +The Solaris specification is entirely optional. |
| 5 | + |
| 6 | +## milestone |
| 7 | +The SMF(Service Management Facility) FMRI which should go to "online" state before we start the desired process within the container. |
| 8 | + |
| 9 | +**`milestone`** *(string, optional)* |
| 10 | + |
| 11 | +### Example |
| 12 | +```json |
| 13 | +"milestone": "svc:/milestone/container:default" |
| 14 | +``` |
| 15 | + |
| 16 | +## limitpriv |
| 17 | +The maximum set of privileges any process in this container can obtain. |
| 18 | +The property should consist of a comma-separated privilege set specification as described in priv_str_to_set(3C) man page for the respective release of Solaris. |
| 19 | + |
| 20 | +**`limitpriv`** *(string, optional)* |
| 21 | + |
| 22 | +### Example |
| 23 | +```json |
| 24 | +"limitpriv": "default" |
| 25 | +``` |
| 26 | + |
| 27 | +## maxShmMemory |
| 28 | +The maximum amount of shared memory allowed for this application container. |
| 29 | +A scale (K, M, G, T) can be applied to the value for each of these numbers (for example, 1M is one megabyte). |
| 30 | +Mapped to max-shm-memory in zonecfg(1M) man page. |
| 31 | + |
| 32 | +**`maxShmMemory`** *(string, optional)* |
| 33 | + |
| 34 | +### Example |
| 35 | +```json |
| 36 | +"maxShmMemory": "512m" |
| 37 | +``` |
| 38 | + |
| 39 | +## cappedCPU |
| 40 | +Sets a limit on the amount of CPU time that can be used by a container. |
| 41 | +The unit used translates to the percentage of a single CPU that can be used by all user threads in a container, expressed as a fraction (for example, .75) or a mixed number (whole number and fraction, for example, 1.25). |
| 42 | +An ncpu value of 1 means 100% of a CPU, a value of 1.25 means 125%, .75 mean 75%, and so forth. |
| 43 | +When projects within a capped container have their own caps, the minimum value takes precedence. |
| 44 | +cappedCPU is mapped to capped-cpu in zonecfg(1M) man page. |
| 45 | + |
| 46 | +* **`ncpus`** *(string, optional)* |
| 47 | + |
| 48 | +### Example |
| 49 | +```json |
| 50 | +"cappedCPU": { |
| 51 | + "ncpus": "8" |
| 52 | +} |
| 53 | +``` |
| 54 | + |
| 55 | +## cappedMemory |
| 56 | +The physical and swap caps on the memory that can be used by this application container. |
| 57 | +A scale (K, M, G, T) can be applied to the value for each of these numbers (for example, 1M is one megabyte). |
| 58 | +cappedMemory is mapped to capped-memory in zonecfg(1M) man page. |
| 59 | + |
| 60 | +* **`physical`** *(string, optional)* |
| 61 | +* **`swap`** *(string, optional)* |
| 62 | + |
| 63 | +### Example |
| 64 | +```json |
| 65 | +"cappedMemory": { |
| 66 | + "physical": "512m", |
| 67 | + "swap": "512m" |
| 68 | +} |
| 69 | +``` |
| 70 | + |
| 71 | +## Network |
| 72 | + |
| 73 | +### Automatic Network (anet) |
| 74 | +anet is specified as an array that is used to setup networking for Solaris application containers. |
| 75 | +The anet resource represents the automatic creation of a network resource for an application container. |
| 76 | +The zones administration daemon, zoneadmd, is the primary process for managing the container's virtual platform. |
| 77 | +One of the daemons is responsibilities is creation and teardown of the networks for the container. |
| 78 | +For more information on the daemon check the zoneadmd(1M) man page. |
| 79 | +When such a container is started, a temporary VNIC(Virtual NIC) is automatically created for the container. |
| 80 | +The VNIC is deleted when the container is torn down. |
| 81 | +The following properties can be used to setup automatic networks. |
| 82 | +For additional information on properties check zonecfg(1M) man page for the respective release of Solaris. |
| 83 | + |
| 84 | +* **`linkname`** *(string, optional)* Specify a name for the automatically created VNIC datalink. |
| 85 | +* **`lowerLink`** *(string, optional)* Specify the link over which the VNIC will be created. |
| 86 | +Mapped to lower-link in the zonecfg(1M) man page. |
| 87 | +* **`allowedAddress`** *(string, optional)* The set of IP addresses that the container can use might be constrained by specifying the allowedAddress property. |
| 88 | +If allowedAddress has not been specified, then they can use any IP address on the associated physical interface for the network resource. |
| 89 | +Otherwise, when allowedAddress is specified, the container cannot use IP addresses that are not in the allowedAddress list for the physical address. |
| 90 | +Mapped to allowed-address in the zonecfg(1M) man page. |
| 91 | +* **`configureAllowedAddress`** *(string, optional)* If configureAllowedAddress is set to true, the addresses specified by allowedAddress are automatically configured on the interface each time the container starts. |
| 92 | +When it is set to false, the allowedAddress will not be configured on container start. |
| 93 | +Mapped to configure-allowed-address in the zonecfg(1M) man page. |
| 94 | +* **`defrouter`** *(string, optional)* The value for the optional default router. |
| 95 | +* **`macAddress`** *(string, optional)* Set the VNIC's MAC addresses based on the specified value or keyword. |
| 96 | +If not a keyword, it is interpreted as a unicast MAC address. |
| 97 | +For a list of the supported keywords please refer to the zonecfg(1M) man page of the respective Solaris release. |
| 98 | +Mapped to mac-address in the zonecfg(1M) man page. |
| 99 | +* **`linkProtection`** *(string, optional)* Enables one or more types of link protection using comma-separated values. |
| 100 | +See the protection property in dladm(8) for supported values in respective release of Solaris. |
| 101 | +Mapped to link-protection in the zonecfg(1M) man page. |
| 102 | + |
| 103 | +#### Example |
| 104 | +```json |
| 105 | +"anet": [ |
| 106 | + { |
| 107 | + "allowedAddress": "172.17.0.2/16", |
| 108 | + "configureAllowedAddress": "true", |
| 109 | + "defrouter": "172.17.0.1/16", |
| 110 | + "linkProtection": "mac-nospoof, ip-nospoof", |
| 111 | + "linkname": "net0", |
| 112 | + "lowerLink": "net2", |
| 113 | + "macAddress": "02:42:f8:52:c7:16" |
| 114 | + } |
| 115 | +] |
| 116 | +``` |
0 commit comments