Skip to content

Commit 5322755

Browse files
[GR-37359] Review and update Get Started with GraalVM Enterprise on OCI guide.
PullRequest: graal/11429
2 parents f97ec0e + 8c029fd commit 5322755

File tree

2 files changed

+90
-45
lines changed

2 files changed

+90
-45
lines changed

ci.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ local javadoc = import "ci_includes/publish-javadoc.jsonnet";
3232
local vm = import 'vm/ci_includes/vm.jsonnet';
3333

3434
# Add a guard to `build` that prevents it from running in the gate
35-
# for a PR that only touches *.md files, the docs, are config files for GitHub.
35+
# for a PR that only touches *.md files, the docs, are config files for GitHub
3636
local add_excludes_guard(build) = build + {
3737
guard+: {
3838
excludes+: ["**.md", "docs/**", ".github/**"]

docs/getting-started/graalvm-enterprise/oci/compute-instances.md

Lines changed: 89 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,24 @@ To replicate the steps in this guide, [create a compute VM instance and connect
1818

1919
## Install GraalVM Enterprise
2020

21-
For convenient installation, GraalVM Enterprise RPMs have been made available in the OCI YUM repository.
21+
For convenience, GraalVM Enterpriise RPMs are available in the Oracle YUM repository.
22+
Each RPM is self-contained and will automatically pull in all the required dependencies.
23+
2224
That means that OCI customers can use the GraalVM Enterprise environment in their cloud instances by installing it with `yum` - a package-management utility for the Linux operating systems.
2325

24-
For demonstration purposes, a demo-instance of the **VM.Standard.E4.Flex** shape with the **Oracle Linux 7.9** pre-built image was created.
25-
The following SSH command is then used to connect to a Linux instance from a Unix-style system:
26-
```shell
27-
ssh -i .ssh/id_rsa opc@INSTANCE_PUBLIC_IP
28-
```
26+
The following instructions have been tested on an OCI Compute Instance with **Oracle Linux 7.9** and **VM.Standard.E4.Flex** with 1 OCPU and 16 GB RAM.
27+
Use the following command to connect to the OCI Compute Instance from a Unix-style system:
28+
29+
```shell
30+
ssh -i .ssh/id_rsa opc@INSTANCE_PUBLIC_IP
31+
```
2932

30-
In this instance, `.ssh/id_rsa` is the full path and name of the file containing the private SSH key, `opc` is the default name for the Oracle Linux image, and `INSTANCE_PUBLIC_IP` is the instance IP address provisioned from the console.
33+
The `.ssh/id_rsa` part is the full path and name of the file containing the private SSH key, `opc` is the default name for the Oracle Linux image, and `INSTANCE_PUBLIC_IP` is the instance IP address provisioned from the console.
3134
For more details, refer to the [Connecting to Your Linux Instance Using SSH](https://docs.cloud.oracle.com/iaas/Content/GSG/Tasks/testingconnection.htm) tutorial.
3235

3336
1. Having connected to the instance, verify which GraalVM Enterprise RPMs are available for the installation, narrowing down the search to the latest release, and Java 11.
3437

3538
```shell
36-
yum check-update
3739
sudo yum provides graalvm22-ee-11-jdk
3840
```
3941
The resulting list includes both current and previous versions of all of the core package and additional features.
@@ -44,62 +46,104 @@ For example, to install the latest version of "Oracle GraalVM Enterprise Edition
4446
```shell
4547
sudo yum install graalvm22-ee-11-jdk
4648
```
47-
The dependent packages, e.g., `libpolyglot`, `llvm` and so on, will also be resolved.
49+
Confirm if the installed package size is okay by typing `yes` at the prompt.
50+
It will install the latest version of **graalvm22-ee-11-jdk** which includes the JVM runtime with the Graal compiler.
4851

49-
![See the resolved dependencies for GraalVM Enterprise](dependencies-resolved.png)
52+
After the installation, the GraalVM Enterprise binary is placed in _/usr/lib64/graalvm_. You can check this with:
5053

51-
After the installation, the GraalVM Enterprise binary is placed in _/usr/lib64/graalvm_.
52-
53-
3. Set up environment variables to point to the GraalVM Enterprise directory.
54-
55-
- Configure the `PATH` and `JAVA_HOME` environment variables in the bash configuration to point to GraalVM Enterprise for this SSH session with the following commands:
5654
```shell
57-
echo "export JAVA_HOME=/usr/lib64/graalvm/graalvm22-ee-java11" >> ~/.bashrc
58-
echo "export PATH='$JAVA_HOME'/bin:'$PATH' " >> ~/.bashrc
55+
ls /usr/lib64/graalvm
5956
```
57+
58+
3. Configure environment variables to point to the GraalVM Enterprise installation for this SSH session. After the installation, the package files are placed in the `/usr/lib64/graalvm` directory, and binaries in `bin` accordingly.
59+
60+
- Set the `PATH` and `JAVA_HOME` environment variables in the bash configuration to point to GraalVM Enterprise with the following commands:
61+
62+
```shell
63+
echo "export JAVA_HOME=/usr/lib64/graalvm/graalvm22-ee-java11" >> ~/.bashrc
64+
```
65+
66+
```shell
67+
echo 'export PATH=$JAVA_HOME/bin:$PATH' >> ~/.bashrc
68+
```
6069
- Activate this change:
61-
```shell
62-
source ~/.bashrc
63-
```
64-
- Verify the values of `PATH` and `JAVA_HOME` to check if the change was successful:
65-
```shell
66-
echo $JAVA_HOME
67-
echo $PATH
68-
```
6970

70-
Now you have a ready-to-go VM instance with GraalVM Enterprise installed and ready to use.
71+
```shell
72+
source ~/.bashrc
73+
```
74+
75+
- Verify the values of `PATH` and `JAVA_HOME`:
76+
77+
```shell
78+
echo $JAVA_HOME
79+
echo $PATH
80+
```
81+
- Run the following command to confirm the version of GraalVM Enterprise JDK installed:
82+
83+
```shell
84+
java -version
85+
```
86+
87+
Now you have a ready-to-go VM instance with GraalVM Enterprise installed.
7188

7289
## Install Additional Features
7390

74-
1. Check what additional features are available for your current GraalVM Enterprise version:
91+
GraalVM Enterprise consists of different features and components - JDK, Native Image, Python runtime, Node.js runtime, LLVM toolchain, etc. - each of which can be installed separately or as an add-on to an existing component.
92+
See [Distribution Components List](https://docs.oracle.com/en/graalvm/enterprise/22/docs/overview/architecture/#distribution-components-list) for more information.
93+
94+
To add additional features to GraalVM Enterprise, use the `yum install <package_name>` command.
95+
96+
1. Check what additional features are available for your current GraalVM Enterprise installation:
7597

7698
```shell
77-
yum check-update
7899
sudo yum provides graalvm22*
79100
```
80-
81-
2. Look up the necessary RPM package name and add it to GraalVM Enterprise with the `yum install <package_name> command` command.
82-
For example, to install [Native Image](../../../reference-manual/native-image/README.md), which is a technology to turn your Java application into a standalone native executable, run this command:
101+
The printed list is enormous. If you are interested in a particular component, for example, the Python runtime, narrow down the search providing the exact package name:
83102

84103
```shell
85-
sudo yum install graalvm22-ee-11-native-image
104+
sudo yum provides graalvm22-ee-11-python*
86105
```
87-
All required dependencies will be automatically installed:
88106

89-
![See the resolved dependencies for GraalVM Enterprise Native Image](ni-dependencies-resolved.png)
107+
2. Install the component to GraalVM Enterprise with the `yum install <package_name> command` command. To install the Python runtime, run:
90108

91-
> **Note:** To add Native Image to GraalVM Enterprise on Oracle Linux 8, currently run these commands:
92109
```shell
93-
sudo yum update -y oraclelinux-release-el8
94-
sudo yum config-manager --set-enabled ol8_codeready_builder
95-
sudo yum install graalvm22-ee-11-native-image
110+
sudo yum install graalvm22-ee-11-python
96111
```
97-
For Linux images with `dnf` or `microdnf` default package managers, run:
112+
Confirm if the installed package size is okay by typing `yes` at the prompt.
113+
114+
### Install Native Image
115+
116+
[Native Image](../../../reference-manual/native-image/README.md) is a technology to turn your Java application into a standalone native executable and has to be installed to GraalVM Enterprise core installation.
117+
118+
119+
1. Search for Native Image PRMs available for your installation:
120+
98121
```shell
99-
dnf update -y oraclelinux-release-el8
100-
dnf --enablerepo ol8_codeready_builder
101-
dnf install graalvm22-ee-11-native-image
122+
sudo yum provides graalvm22-ee-11-native-image*
102123
```
124+
2. Install Native Image using the `yum install <package_name> command` command. All required dependencies will be automatically resolved.
125+
126+
- On Oracle Linux 7.9, run:
127+
```shell
128+
sudo yum install graalvm22-ee-11-native-image
129+
```
130+
Confirm if the installed package size is okay by typing `yes` at the prompt.
131+
132+
- On Oracle Linux 8, run these commands one by one:
133+
```shell
134+
sudo yum update -y oraclelinux-release-el8
135+
sudo yum config-manager --set-enabled ol8_codeready_builder
136+
sudo yum install graalvm22-ee-11-native-image
137+
```
138+
Confirm if the installed package size is okay by typing `yes` at the prompt.
139+
140+
- On Oracle Linux 8 with `dnf` or `microdnf` default package managers, run these commands one by one:
141+
```shell
142+
dnf update -y oraclelinux-release-el8
143+
dnf --enablerepo ol8_codeready_builder
144+
dnf install graalvm22-ee-11-native-image
145+
```
146+
Confirm if the installed package size is okay by typing `yes` at the prompt.
103147

104148
## Update GraalVM Enterprise
105149

@@ -118,15 +162,16 @@ The `yum` package manager for Oracle Linux can be used to update an existing Gra
118162
java -version
119163
```
120164

121-
The **graalvm22-ee-17-jdk** package is installed alongside **graalvm21-ee-11-jdk** in the _/usr/lib64/graalvm_ directory. Note that regardless the version printed to the console, the `PATH` and `JAVA_HOME` environment variables still point to the old version. Reset the variables as described in [Install GraalVM Enterprise](#install-graalvm-enterprise), step 3.
165+
The **graalvm22-ee-17-jdk** package is installed alongside **graalvm22-ee-11-jdk** in the _/usr/lib64/graalvm_ directory. Note that regardless the version printed to the console, the `PATH` and `JAVA_HOME` environment variables still point to the old version. Reset the variables as described in [Install GraalVM Enterprise](#install-graalvm-enterprise), step 3.
122166

123167
### Note on `yum upgrade`
124168

125169
The `yum upgrade` command can be used to update on the same year package line, for example, to upgrade from GraalVM Enterprise 22.0.0 to version 22.0.1 when this RPM package becomes available:
126170

127171
```shell
128-
sudo yum upgrade graalvm22-ee-17-jdk
172+
sudo yum upgrade graalvm22-ee-11-jdk
129173
```
174+
As there are no newer package available, you will see the `No packages marked for update` message.
130175

131176
It will update the whole system and remove the obsolete GraalVM Enterprise installation.
132177

0 commit comments

Comments
 (0)