Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,28 @@
### Added
- [GCP Compute Engine] Added new GCP Compute Engine standalone backend
- [Core] Added support for variable-length parameters in functions passed to the executor.
- [Standalone] Added rollback logic to remove partially created resources when initialization fails
- [Python] Added support for Python 3.14

### Changed
- [K8s] Auto-detect cluster architecture when building runtimes.
- [Runtimes] Updated runtime images and related version references across backends.
- [K8s] Added configuration for pod and container `securityContext`.
- [Docs] Corrected MinIO/Ceph config template keys and removed obsolete Kubernetes image references.
- [GCP Functions] Updated `gcp_functions` backend to Google Cloud Run functions (Cloud Functions v2 API).
- [Python] Updated all backend python versions (deprecated Python 3.9, added Python 3.14)
- [Python] Updated all backends python versions (deprecated Python 3.9)
- [Azure Funcions] Updated default funcions plan to Flex Consumption
- [AWS EC2] Updated default Ubuntu Image to Ubuntu 24
- [Azure VMS] Updated default Ubuntu Image to Ubuntu 24

### Fixed
- [K8s] Fixed default runtime builds impacted by Debian Buster end-of-life.
- [GCP Cloud Run] Added Artifact Registry (`pkg.dev`) runtime deployment support
- [K8s] Run default runtime image as non-root user (uid 1000) (#1469)
- [AWS] Fixed AWS backends execution
- [GCP] Fixed GCP backends execution
- [Azure] Fixed Azure backends execution
- [K8s] Run default runtime image as non-root user (uid 1000)
- [AWS] Fixed EC2 standalone initialization in consume mode and ECR authentication when building runtimes
- [GCP] Fixed Cloud Functions runtime deletion and gRPC fork warnings during multiprocess execution on macOS
- [Azure] Fixed Azure Functions deployment on Flex Consumption and consolidated container registry login across Azure backends
- [Oracle] Fixed API key path resolution with `~` expansion and added configurable OCIR registry login


## [v3.6.4]
Expand Down
3 changes: 3 additions & 0 deletions config/config_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,9 @@
#worker_processes: 1
#invoke_pool_threads: 64
#runtime_include_function: False
#docker_server: <REGION>.ocir.io # Auto-set to {region}.ocir.io if not provided
#docker_user: <TENANCY_NAMESPACE>/<USERNAME>
#docker_password: <AUTH_TOKEN> # From Oracle Cloud auth tokens page

# Oracle Object Storage – object storage (beta)
#oracle_oss:
Expand Down
19 changes: 11 additions & 8 deletions docs/source/compute_config/oracle_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Lithops with *Oracle Functions* as serverless compute backend.
python3 -m pip install lithops[oracle]
```

2. Access to your [Oracle Cloud Console](https://cloud.oracle.com/) and activate your Functions service instance.
2. Access your [Oracle Cloud Console](https://cloud.oracle.com/) and activate your Functions service instance.

## Configuration

Expand Down Expand Up @@ -46,7 +46,7 @@ Now that the dynamic group is set up, you'll need to create a policy that allows

1. **Open the navigation menu again.** Under Governance and Administration, go to Identity, and then click [**Policies**](https://cloud.oracle.com/identity/domains/policies).

2. Choose your **compartment** and Click on the **Create Policy** button.
2. Choose your **compartment** and click on the **Create Policy** button.

3. **In the Create Policy dialog box:**

Expand All @@ -61,7 +61,7 @@ Now that the dynamic group is set up, you'll need to create a policy that allows
4. **Click Create** to create the policy.


### Configure lithops
### Configure Lithops
Now, your Oracle Functions have the necessary permissions to manage resources in your Oracle Cloud Infrastructure tenancy.

1. Navigate to the [VCNs page](https://cloud.oracle.com/networking/vcns) and create a new VCN using the **VCN Wizard**. Then choose *create VCN with Internet Connectivity*. In the next page, you can uncheck `Use DNS hostnames in this VCN` and leave the rest of the parameters as provided by default.
Expand All @@ -85,12 +85,12 @@ oracle:

oracle_f:
subnet_id: <SUBNET_OCID>
docker_user: <TENANCY_NAMESPACE>/<USERNAME>
docker_password: <AUTH_TOKEN>
```


Also, remember to log in to your Oracle container registry before you build your runtime, since runtimes are uploaded to the Oracle container registry. `<username>` is most likely your email address. You can create a new auth token [here](https://cloud.oracle.com/identity/domains/my-profile/auth-tokens).

```
```bash
docker login <region>.ocir.io -u <tenancy-namespace>/<username> -p <authentication_token>
```

Expand All @@ -113,9 +113,12 @@ docker login <region>.ocir.io -u <tenancy-namespace>/<username> -p <authenticati
|---|---|---|---|---|
|oracle_f | subnet_id | |yes | Private subnet OCID |
|oracle_f | region | |no | Region name. For example: `eu-madrid-1`. Lithops will use the region set under the `oracle` section if it is not set here |
|oracle_f | docker_server | `<region>.ocir.io` |no | Oracle Container Registry URL. Auto-set to `{region}.ocir.io` from `oracle.region` if not provided |
|oracle_f | docker_user | |no | OCIR username in the form `<tenancy-namespace>/<username>`. Required when building or pushing runtime images. `<username>` is most likely your email address |
|oracle_f | docker_password | |no | OCIR auth token. Required when building or pushing runtime images. Create one [here](https://cloud.oracle.com/identity/domains/my-profile/auth-tokens). Lithops logs in automatically before pushing runtime images |
|oracle_f | max_workers | 300 | no | Max number of workers. Oracle limits the total to 60 GB RAM across any number of workers |
|oracle_f | worker_processes | 1 | no | Number of Lithops processes within a given worker. This can be used to parallelize function activations within a worker |
|oracle_f | runtime | |no | Runtime name you built and deployed using the lithops client|
|oracle_f | runtime | |no | Runtime name you built and deployed using the Lithops client|
|oracle_f | runtime_memory | 256 |no | Memory limit in MB. Default 256MB |
|oracle_f | runtime_timeout | 300 |no | Runtime timeout in seconds. Default 5 minutes |
|oracle_f | runtime_include_function | False | no | If set to true, Lithops will automatically build a new runtime, including the function's code, instead of transferring it through the storage backend at invocation time. This is useful when the function's code size is large (in the order of 10s of MB) and the code does not change frequently |
Expand All @@ -130,7 +133,7 @@ lithops hello -b oracle_f -s oracle_oss

## Viewing the execution logs

You can view the function executions logs in your local machine using the *lithops client*:
You can view the function execution logs on your local machine using the *Lithops client*:

```bash
lithops logs poll
Expand Down
9 changes: 9 additions & 0 deletions lithops/serverless/backends/oracle_f/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ def load_config(config_data=None):
msg = f'"{param}" is mandatory in the "oracle" section of the configuration'
raise Exception(msg)

config_data['oracle']['key_file'] = os.path.abspath(
os.path.expanduser(config_data['oracle']['key_file'])
)

for param in REQ_PARAMS_2:
if param not in config_data['oracle_f']:
msg = f'"{param}" is mandatory in the "oracle_f" section of the configuration'
Expand All @@ -106,3 +110,8 @@ def load_config(config_data=None):
temp = copy.deepcopy(config_data['oracle_f'])
config_data['oracle_f'].update(config_data['oracle'])
config_data['oracle_f'].update(temp)

if 'docker_server' not in config_data['oracle_f']:
config_data['oracle_f']['docker_server'] = (
f"{config_data['oracle_f']['region']}.ocir.io"
)
6 changes: 6 additions & 0 deletions lithops/serverless/backends/oracle_f/oracle_f.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ def build_runtime(self, runtime_name, dockerfile, extra_args=[]):
os.remove(config.FH_ZIP_LOCATION)

logger.debug(f'Pushing runtime {image_name} to Oracle Cloud Container Registry')
docker_user = self.config.get('docker_user')
docker_password = self.config.get('docker_password')
docker_server = self.config.get('docker_server')
if docker_user and docker_password:
logger.debug('Container registry credentials found in config. Logging in into the registry')
utils.docker_login(docker_user, docker_password, docker_server)
if utils.is_podman(docker_path):
cmd = f'{docker_path} push {image_name} --format docker --remove-signatures'
else:
Expand Down
5 changes: 5 additions & 0 deletions lithops/storage/backends/oracle_oss/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#

import copy
import os


CONNECTION_POOL_SIZE = 300
Expand All @@ -34,6 +35,10 @@ def load_config(config_data=None):
msg = f'"{param}" is mandatory under "oracle" section of the configuration'
raise Exception(msg)

config_data['oracle']['key_file'] = os.path.abspath(
os.path.expanduser(config_data['oracle']['key_file'])
)

temp = copy.deepcopy(config_data['oracle_oss'])
config_data['oracle_oss'].update(config_data['oracle'])
config_data['oracle_oss'].update(temp)
Loading