Skip to content

Commit 0dc3de1

Browse files
committed
[GR-46651] Update Oracle GraalVM OCI Guides to Use New RPMs.
PullRequest: graal/14834
2 parents 2d0e9eb + e8ccf50 commit 0dc3de1

File tree

5 files changed

+122
-163
lines changed

5 files changed

+122
-163
lines changed

docs/getting-started/graalvm-enterprise/oci/cloud-shell.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ This guide shows you how to get started with Oracle GraalVM in Oracle Cloud Infr
99

1010
[OCI Cloud Shell](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/cloudshellintro.htm) is a browser-based terminal accessible from the Oracle Cloud Console. It provides access to a Linux shell with a pre-authenticated OCI Command Line Interface (CLI), preinstalled developer tools, and comes with 5GB of storage.
1111

12-
Oracle GraalVM for JDK 17 with Native Image are preinstalled in Cloud Shell.
12+
Oracle GraalVM JDK 17 with Native Image is preinstalled in Cloud Shell, so you do not have to install and configure a development machine.
1313

14-
> Note: Oracle GraalVM is available on Oracle Cloud Infrastructure at no additional cost.
14+
> Note: Oracle GraalVM license and support are included in the Oracle Cloud Infrastructure subscription at no additional cost.
1515
1616
## Steps to Use Oracle GraalVM in Cloud Shell
1717

docs/getting-started/graalvm-enterprise/oci/code-editor.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ This guide shows you how to get started with Oracle GraalVM in Oracle Cloud Infr
99

1010
[OCI Code Editor](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/code_editor_intro.htm) provides a rich, in-console editing environment that enables you to edit code without having to switch between the Oracle Cloud Console and your local development environment. The Code Editor enables you to edit and deploy code for OCI services directly from the OCI Console.
1111

12-
Oracle GraalVM for JDK 17 with Native Image is preinstalled in Cloud Shell, so you do not have to install and configure a development machine. Code Editor's integration with Cloud Shell gives you direct access to it.
12+
Oracle GraalVM JDK 17 with Native Image is preinstalled in Cloud Shell, so you do not have to install and configure a development machine. Code Editor's integration with Cloud Shell gives you direct access to it.
1313

14-
> Note: Oracle GraalVM is available on Oracle Cloud Infrastructure at no additional cost.
14+
> Note: Oracle GraalVM license and support are included in the Oracle Cloud Infrastructure subscription at no additional cost.
1515
1616
## Create and Run a Java Application in OCI Code Editor
1717

docs/getting-started/graalvm-enterprise/oci/installation-compute-instance-with-OL.md

Lines changed: 95 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -5,185 +5,151 @@ permalink: /getting-started/oci/compute-instance/
55

66
# Oracle GraalVM on OCI Compute Instances with Oracle Linux
77

8-
This guide describes how to install Oracle GraalVM on an Oracle Cloud Infrastructure (OCI) Compute instance with Oracle Linux 7,8, and 9.
9-
For users who prefer a Bare Metal Machine instance, see [this documentation](https://cloud.oracle.com/iaas/whitepapers/deploying_custom_os_images.pdf).
10-
For complete beginners, [start with this tutorial to create and launch your first Linux instance](https://docs.cloud.oracle.com/iaas/Content/GSG/Reference/overviewworkflow.htm?tocpath=Getting%20Started%7CTutorial%20-%20Launching%20Your%20First%20Linux%20Instance%7C_____0).
8+
This guide describes how to install Oracle GraalVM on an Oracle Cloud Infrastructure (OCI) Compute instance with Oracle Linux 7, 8, and 9.
9+
For complete beginners, [start with this tutorial to create and launch your first Linux instance](https://docs.oracle.com/iaas/Content/GSG/Reference/overviewworkflow.htm).
1110

12-
> Note: [Oracle Cloud Infrastructure (OCI)](https://www.oracle.com/cloud) provides Oracle GraalVM to its customers for free. Oracle
13-
GraalVM support is included in an Oracle Cloud subscription.
11+
> Note: Oracle GraalVM license and support are included in the Oracle Cloud Infrastructure subscription at no additional cost.
1412
1513
### Prerequisites
1614

17-
To replicate the steps in this guide, [create a Compute instance and connect to it](https://docs.cloud.oracle.com/iaas/Content/GSG/Reference/overviewworkflow.htm?tocpath=Getting%20Started%7CTutorial%20-%20Launching%20Your%20First%20Linux%20Instance%7C_____0).
15+
To replicate the steps in this guide, [create a Compute instance and connect to it](https://docs.oracle.com/iaas/Content/GSG/Reference/overviewworkflow.htm).
1816

1917
## Install Oracle GraalVM
2018

21-
For convenience, Oracle GraalVM RPMs are available in the Oracle YUM repository.
22-
Each RPM is self-contained and will automatically pull in all required dependencies.
19+
For convenience, Oracle GraalVM RPMs are available in the Oracle YUM repository.
20+
RPMs for Oracle GraalVM for JDK 17 and Oracle GraalVM for JDK 20 are available with the package names `graalvm-17-native-image` and `graalvm-20-native-image` respectively.
21+
These Oracle GraalVM distributions include a JDK and Natime Image.
22+
Each Oracle GraalVM RPM is self-contained and all required dependencies will be automatically resolved during the installation.
2323

24-
That means that OCI customers can use the Oracle GraalVM environment in their compute instances by installing it with `yum`&emdash;a package-management utility for the Linux operating system.
24+
That means that OCI customers can use Oracle GraalVM in their compute instances, just like any other Java Development Kit, by installing it with `yum`, `dnf`, or `microdnf` default package managers, depending on the Oracle Linux version.
2525

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.
2726
Use the following command to connect to the OCI Compute Instance from a Unix-style system:
2827

2928
```shell
3029
ssh -i .ssh/id_rsa opc@INSTANCE_PUBLIC_IP
3130
```
3231

33-
`.ssh/id_rsa` is the full path and name of the file containing your 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.
32+
Where `.ssh/id_rsa` is the full path and name of the file containing your 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.
3433
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.
3534

36-
1. Having connected to the instance, verify which Oracle GraalVM RPMs are available for the installation, narrowing down the search to the latest release, and Java 17. Use the following command:
35+
The installation steps may differ per Oracle Linux version or package manager.
3736

37+
### Oracle Linux 7
38+
39+
1. Install newer devtoolset with GCC version 10 (required by Oracle GraalVM Native Image):
3840
```shell
39-
sudo yum provides graalvm22-ee-17-jdk
41+
sudo yum -y install oracle-softwarecollection-release-el7
4042
```
41-
The resulting list includes both current and previous versions of all of the core package and additional features.
42-
43-
2. Find the appropriate RPM package name, and install Oracle GraalVM with `sudo yum install <package_name>`.
44-
For example, to install the latest version of "Oracle GraalVM JDK17 Java Development Kit", run:
45-
4643
```shell
47-
sudo yum install graalvm22-ee-17-jdk
44+
sudo yum install devtoolset-10
4845
```
49-
Confirm that the installed package size is correct by entering `yes` at the prompt.
50-
It will install the latest version of **graalvm22-ee-17-jdk** which includes the JVM runtime with the Graal compiler.
51-
52-
After the installation, the Oracle GraalVM binary is placed in _/usr/lib64/graalvm_. You can check this with:
53-
46+
2. Enable the newer devtoolset by default:
5447
```shell
55-
ls /usr/lib64/graalvm
48+
echo 'source scl_source enable devtoolset-10' >> ~/.bashrc
5649
```
50+
3. Enter a new bash session with the newer devtoolset enabled:
51+
```
52+
bash
53+
```
54+
4. Install Oracle GraalVM, for example, for JDK 20:
55+
```
56+
sudo yum install graalvm-20-native-image
57+
```
58+
Confirm that the installed package size is correct by entering `yes` at the prompt.
5759

58-
3. Configure environment variables to point to the Oracle GraalVM installation for this SSH session. After 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 Oracle GraalVM with the following commands:
61-
62-
```shell
63-
echo "export JAVA_HOME=/usr/lib64/graalvm/graalvm22-ee-java17" >> ~/.bashrc
64-
```
65-
66-
```shell
67-
echo 'export PATH=$JAVA_HOME/bin:$PATH' >> ~/.bashrc
68-
```
69-
- Activate this change:
70-
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 Oracle GraalVM installed:
82-
83-
```shell
84-
java -version
85-
```
60+
### Oracle Linux 8 and 9
61+
62+
On Oracle Linux 8 and 9 with the `yum` package manager, run these commands one by one:
63+
```shell
64+
sudo yum update -y oraclelinux-release-el8
65+
```
66+
```shell
67+
sudo yum config-manager --set-enabled ol8_codeready_builder
68+
```
69+
```shell
70+
sudo yum install graalvm-20-native-image
71+
```
72+
Confirm that the installed package size is correct by entering `yes` at the prompt.
73+
74+
On Oracle Linux 8 and 9 with `dnf` or `microdnf` default package managers, run these commands one by one:
75+
```shell
76+
dnf update -y oraclelinux-release-el8
77+
```
78+
```shell
79+
dnf config-manager --set-enabled ol8_codeready_builder
80+
```
81+
```shell
82+
dnf install graalvm-20-native-image
83+
```
84+
Confirm that the installed package size is correct by entering `yes` at the prompt.
85+
86+
### Configure Environment Variables
87+
88+
Configure environment variables to point to the Oracle GraalVM installation for this SSH session.
89+
After installation, the package files are placed in the _/usr/lib64/graalvm_ directory, and binaries in _bin_ accordingly.
90+
91+
1. Set the `PATH` and `JAVA_HOME` environment variables in the bash configuration to point to Oracle GraalVM with the following commands:
92+
```shell
93+
echo "export JAVA_HOME=/usr/lib64/graalvm/graalvm-java20" >> ~/.bashrc
94+
```
95+
```shell
96+
echo 'export PATH=$JAVA_HOME/bin:$PATH' >> ~/.bashrc
97+
```
98+
2. Activate this change:
99+
```shell
100+
source ~/.bashrc
101+
```
102+
3. Check the values of `PATH` and `JAVA_HOME`, and the Java version to confirm the installation was successful:
103+
```shell
104+
echo $JAVA_HOME
105+
```
106+
```shell
107+
echo $PATH
108+
```
109+
```shell
110+
java -version
111+
```
86112

87113
Now you have a ready-to-go OCI Compute instance with Oracle GraalVM installed.
88114

89115
## Install Additional Features
90116

91-
Oracle GraalVM consists of several features and components&emdash;JDK, Native Image, Javascript runtime, and Node.js runtime&emdash;each of which can be installed separately or as an add-on.
92-
See the [Distribution Components List](https://docs.oracle.com/en/graalvm/jdk/20/docs/support/#certified-platforms) for more information.
93-
94-
To add additional features to Oracle GraalVM, use the `yum install <package_name>` command.
117+
Oracle GraalVM provides more technologies such as the Javascript runtime, Java on Truffle, etc., each of which can be installed as an add-on.
118+
See the [Features Support list](https://docs.oracle.com/en/graalvm/jdk/20/docs/support/#features-support) for more information.
95119

96120
1. Check what additional features are available for your current Oracle GraalVM installation:
97121

98122
```shell
99-
sudo yum provides graalvm22*
123+
sudo yum list graalvm-20*
100124
```
101-
The printed list is very large. If you are interested in a particular component, for example, the Python runtime, narrow down the search providing the exact package name:
102-
103125
```shell
104-
sudo yum provides graalvm22-ee-17-python*
126+
dnf list graalvm-20*
105127
```
106-
107-
2. Add the component to Oracle GraalVM with the `yum install <package_name> command` command. For example, to install the Python runtime, run:
128+
The printed list may be large. If you are interested in a particular feature, for example, the Python runtime, narrow down the search providing the exact package name:
108129

109130
```shell
110-
sudo yum install graalvm22-ee-17-python
131+
sudo yum list graalvm-20-python*
111132
```
112-
Confirm that the installed package size is correct by entering `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 added to the Oracle GraalVM JDK installation.
117-
118-
1. Search for Native Image RPMs available for your installation:
119-
120133
```shell
121-
sudo yum provides graalvm22-ee-17-native-image*
134+
dnf list graalvm-20-python*
122135
```
123-
2. Install Native Image using the `yum install <package_name> command` command. All required dependencies will be automatically resolved.
124-
125-
- On Oracle Linux 7.9, run:
126-
```shell
127-
# Install newer devtoolset with GCC version 10 (required by Native Image)
128-
sudo yum -y install oracle-softwarecollection-release-el7
129-
sudo yum install devtoolset-10
130-
# Enable the newer devtoolset by default
131-
echo 'source scl_source enable devtoolset-10' >> ~/.bashrc
132-
# Enter a new bash session with the newer devtoolset enabled
133-
bash
134-
# Install Native Image
135-
sudo yum install graalvm22-ee-17-native-image
136-
```
137-
Confirm that the installed package size is correct by entering `yes` at the prompt.
138-
139-
- On Oracle Linux 8 and 9, run these commands one by one:
140-
```shell
141-
sudo yum update -y oraclelinux-release-el8
142-
sudo yum config-manager --set-enabled ol8_codeready_builder
143-
sudo yum install graalvm22-ee-17-native-image
144-
```
145-
Confirm that the installed package size is correct by entering `yes` at the prompt.
146-
147-
- On Oracle Linux 8 and 9 with `dnf` or `microdnf` default package managers, run these commands one by one:
148-
```shell
149-
dnf update -y oraclelinux-release-el8
150-
dnf config-manager --set-enabled ol8_codeready_builder
151-
dnf install graalvm22-ee-17-native-image
152-
```
153-
Confirm that the installed package size is correct by entering `yes` at the prompt.
154-
155-
## Update Oracle GraalVM
156-
157-
The `yum` package manager for Oracle Linux can be used to update an existing GraalVM installation or replace it with another version.
158-
159-
1. To update GraalVM, for example, from version 21.x to 22.x, run:
160136

137+
2. Install the feature to Oracle GraalVM using its `<package_name>`. For example, to install the Python runtime with `yum`, run:
161138
```shell
162-
sudo yum install graalvm22-ee-17-jdk
139+
sudo yum install graalvm-20-python
163140
```
164-
165-
2. Confirm that the installed package size is correct by entering `yes` at the prompt.
166-
3. Check the Java version to confirm that the update was successful:
167-
141+
With `dnf`:
168142
```shell
169-
java -version
143+
dnf install graalvm-20-python
170144
```
145+
Confirm that the installed package size is correct by entering `yes` at the prompt.
171146

172-
The **graalvm22-ee-17-jdk** package is installed alongside **graalvm22-ee-17-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 step 3.
173-
174-
### Note on `yum upgrade`
175-
176-
The `yum upgrade` command can be used to update on the same year package line, for example, to upgrade from Oracle GraalVM 22.3.1 to version 22.3.2 when this RPM package becomes available:
147+
Congratulations! You have installed Oracle GraalVM on the Compute instance with the Oracle Linux image, and can use it as any other Java Development Kit.
177148

178-
```shell
179-
sudo yum upgrade graalvm22-ee-17-jdk
180-
```
181-
As there is no newer package available, you will see the `No packages marked for update` message.
149+
### Related Documentation
182150

183-
It will update the whole system and remove any obsolete Oracle GraalVM installation.
151+
- [Oracle GraalVM in OCI DevOps Build Pipelines](installation-devops-build-pipeline.md)
184152

185-
### Related Documentation
153+
- [Oracle GraalVM in OCI Cloud Shell](cloud-shell.md)
186154

187155
- [Get Started with GraalVM on Oracle Linux in OCI](https://luna.oracle.com/lab/3b0dcf97-22d0-489b-a049-5d269199fa00): Run the interactive workshop to install Oracle GraalVM on Oracle Linux 8 (all the necessary cloud resources are provisioned).
188-
189-
- [Accelerate Applications in Oracle Cloud with Oracle GraalVM](https://luna.oracle.com/lab/d502417b-df66-45be-9fed-a3ac8e3f09b1): Run the interactive workshop to see how Oracle GraalVM accelerates Java applications in OCI.

0 commit comments

Comments
 (0)