Skip to content

Commit 0e6f118

Browse files
Merge pull request #15 from oracle/main
syncup
2 parents 0a375a8 + ee62285 commit 0e6f118

File tree

75 files changed

+5248
-1024
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+5248
-1024
lines changed

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# The last matching pattern has the most precedence.
22
* @gvenzl
33
/ContainerTools/ @AmedeeBulle
4-
/OLCNE/ @rafabene
4+
/OCNE/ @scoter-oracle
55
/OracleDatabase/ @gvenzl
66
/OracleLinux/ @scoter-oracle
77
/OracleDG/ @rcitton

ContainerTools/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@ A Vagrantfile that installs and configures the Container Tools module on Oracle
44
This module provides the tools to use container runtimes. That is: mainly Podman, but also Buildah, Skopeo...
55

66
__Note:__ This Vagrant project is deprecated. However, the same functionality is
7-
available as an extension to the OracleLinux/8 project. For more information,
8-
see the [Container Tools](../OracleLinux/8/README.md#container-tools) section of
9-
the OracleLinux/8 [README.md](../OracleLinux/8/README.md) file.
7+
available as an extension to the OracleLinux/8 and OracleLinux/9 projects. For
8+
more information, see the Container Tools section of the Oracle Linux/8
9+
[README.md](../OracleLinux/8/README.md#container-tools) file or the Oracle
10+
Linux/9 [README.md](../OracleLinux/9/README.md#container-tools) file.
1011

1112
## Prerequisites
1213
1. Install [Oracle VM VirtualBox](https://www.virtualbox.org/wiki/Downloads)
1314
1. Install [Vagrant](https://vagrantup.com/)
1415

1516
## Getting started
16-
1. Clone this repository `git clone https://github.com/oracle/vagrant-boxes`
17-
1. Change into the `vagrant-boxes/ContainerTools` folder
17+
1. Clone this repository `git clone https://github.com/oracle/vagrant-projects`
18+
1. Change into the `vagrant-projects/ContainerTools` folder
1819
1. Run `vagrant up; vagrant ssh`
1920
1. Within the guest, run Podman commands, for example `podman run -it oraclelinux:7-slim` to run an Oracle Linux 7 container, or `podman run -ti oraclelinux:8-slim` to run an Oracle Linux 8 container
2021

ContainerTools/Vagrantfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
VAGRANTFILE_API_VERSION = "2"
1818

1919
# Box metadata location and box name
20-
BOX_URL = "https://oracle.github.io/vagrant-boxes/boxes"
20+
BOX_URL = "https://oracle.github.io/vagrant-projects/boxes"
2121
BOX_NAME = "oraclelinux/8"
2222

2323
# define hostname

OLCNE/.env renamed to OCNE/.env

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Oracle Linux Cloud Native Environment configuration file
1+
# -*- mode: shell-script -*-
2+
# vi: set ft=shell :
3+
4+
# Oracle Cloud Native Environment configuration file
25
#
36
# Requires vagrant-env plugin
47
#
@@ -8,12 +11,22 @@
811
# Verbose console
912
# VERBOSE=false
1013

11-
# Set vCPU count and memory for the VMs (3GB minimum required for Istio)
12-
# CPUS=2
13-
# MEMORY=3072
14+
# Set the VM provider host-only / private network subnet
15+
# SUBNET=192.168.99
16+
17+
# Set vCPU count and memory for the VMs:
18+
# + 2 vCPU/1770MB absloute memory minimum for Master node(s)
19+
# + 1 vCPU/700MB absloute memory minimum for Worker node(s)
20+
# + 3GB memory minimum required for Istio module on Worker nodes
21+
# OPERATOR_CPUS=1
22+
# OPERATOR_MEMORY=1024
23+
# MASTER_CPUS=2
24+
# MASTER_MEMORY=2048
25+
# WORKER_CPUS=1
26+
# WORKER_MEMORY=1024
1427

1528
# Group VirtualBox containers
16-
# VB_GROUP="OLCNE"
29+
# VB_GROUP="OCNE"
1730

1831
# Create a separate instance for the operator node?
1932
# The default is to install the Platform API Server and CLI tool on
@@ -26,7 +39,7 @@
2639

2740
# Creates an extra disk (/dev/sdb) so it can be used as a
2841
# Gluster Storage for Kubernetes Persistent Volumes
29-
# EXTRA_DISK = false
42+
# EXTRA_DISK=false
3043

3144
# Number of worker nodes to provision
3245
# NB_WORKERS=2
@@ -37,29 +50,40 @@
3750
# Additional yum channel to consider (e.g. local repo)
3851
# YUM_REPO=
3952

40-
# Add OLCNE developer channel
41-
# OLCNE_DEV=false
53+
# Add OCNE developer channel
54+
# OCNE_DEV=false
4255

43-
# Container registry for Oracle Linux Cloud Native Environment images
56+
# Container registry for Oracle Cloud Native Environment images
4457
# You can use registry mirrors in a region close to you.
4558
# Check the README.md file for more details.
46-
# REGISTRY_OLCNE='container-registry.oracle.com/olcne'
59+
# REGISTRY_OCNE='container-registry.oracle.com/olcne'
4760

4861
# Use specific NGINX version (mainly used for development)
49-
# NGINX_IMAGE=
62+
# NGINX_IMAGE=nginx:1.17.7
5063

5164
# Environment and cluster names
52-
# OLCNE_ENV_NAME="olcne-env"
53-
# OLCNE_CLUSTER_NAME="olcne-cluster"
65+
# OCNE_ENV_NAME="ocne-env"
66+
# OCNE_CLUSTER_NAME="ocne-cluster"
5467

5568
# Deploy the Helm module?
5669
# DEPLOY_HELM=false
57-
# HELM_MODULE_NAME="olcne-helm"
70+
# HELM_MODULE_NAME="ocne-helm"
5871

5972
# Deploy the Istio module? Requires the Helm module and will set DEPLOY_HELM to 1 if not set.
6073
# DEPLOY_ISTIO=false
61-
# ISTIO_MODULE_NAME="olcne-istio"
74+
# ISTIO_MODULE_NAME="ocne-istio"
75+
76+
# Deploy the Gluster module? Requires the Helm module and will set DEPLOY_HELM to 1 if not set.
77+
# DEPLOY_GLUSTER=false
78+
# GLUSTER_MODULE_NAME="ocne-gluster"
79+
80+
# Deploy the MetalLB module? Requires the Helm module and will set DEPLOY_HELM to 1 if not set.
81+
# DEPLOY_METALLB=false
82+
# METALLB_MODULE_NAME="ocne-metallb"
6283

6384
# Override number of masters to deploy
6485
# This should not be changed -- for development purpose
6586
# NB_MASTERS=1
87+
88+
# Update Base OS
89+
# UPDATE_OS=false
File renamed without changes.

OCNE/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.env.local*
2+
admin.conf
3+
local
4+
id_rsa*
5+
known_hosts*
6+
*.swp
7+
heketi.json*
8+
topology-olcne.json*
9+
hyperconverged.yaml*
10+
ignore-systemd-session-slice.conf*

OLCNE/README.md renamed to OCNE/README.md

Lines changed: 60 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,47 @@
1-
# Vagrant project to set up Oracle Linux Cloud Native Environment on Oracle Linux 8
1+
# Vagrant project to set up Oracle Cloud Native Environment on Oracle Linux 8
22

33
This Vagrant project will deploy and configure the following components:
44

55
- One or more master nodes (one by default, 3 in HA mode)
66
- One or more worker nodes (2 by default)
7-
- An optional operator node for the Oracle Linux Cloud Native Environment
7+
- An optional operator node for the Oracle Cloud Native Environment
88
Platform API Server and Platform CLI tool (default is to install these
99
components on the first master node)
1010

1111
If you enable multiple master nodes, an operator node is automatically deployed
1212
to provide egress routing for the cluster.
1313

14-
All master and worker nodes will have the Oracle Linux Cloud Native
14+
All master and worker nodes will have the Oracle Cloud Native
1515
Environment Platform Agent installed and configured to communicate with the
1616
Platform API Server on the operator node.
1717

18-
The installation includes the Kubernetes module for Oracle Linux Cloud
19-
Native Environment which deploys Kubernetes 1.18.10 configured to use
18+
The installation includes the Kubernetes module for Oracle Cloud
19+
Native Environment which deploys Kubernetes [1.24.8](https://docs.oracle.com/en/operating-systems/olcne/1.5/relnotes/components.html#d672e108) configured to use
2020
the CRI-O runtime interface. Two runtime engines are installed, runc and
2121
Kata Containers.
2222

23-
You may optionally enable the deployment of the Helm and Istio modules. Note
24-
that enabling the Istio module will automatically enable the Helm module.
23+
You may optionally enable the deployment of the Helm, Istio, MetalLB or Gluster
24+
modules. Note that enabling the Istio, MetalLB or Gluster modules will
25+
automatically enable the Helm module.
2526

2627
_Note:_ Kata Containers requires Intel hardware virtualization support and
2728
will not work in a VirtualBox guest until nested virtualization support is
2829
released for Intel CPUs.
2930

3031
## Prerequisites
3132

32-
1. Read the [prerequisites in the top level README](../README.md#prerequisites) to set up Vagrant with either VirtualBox or KVM
33-
1. [vagrant-env](https://github.com/gosuri/vagrant-env) plugin is optional but
33+
1. Read the [prerequisites in the top level README](../README.md#prerequisites)
34+
to set up Vagrant with either VirtualBox or KVM
35+
2. [vagrant-env](https://github.com/gosuri/vagrant-env) plugin is optional but
3436
makes configuration much easier
3537

3638
## Quick start
3739

3840
1. Clone this repository `git clone https://github.com/oracle/vagrant-projects`
39-
1. Change into the `vagrant-projects/OLCNE` directory
40-
1. Run `vagrant up`
41+
2. Change into the `vagrant-projects/OCNE` directory
42+
3. Run `vagrant up`
4143

42-
Your Oracle Linux Cloud Native Environment is ready!
44+
Your Oracle Cloud Native Environment is ready!
4345

4446
From any master node (e.g. master1) you can check the status of the cluster (as
4547
the `vagrant` user). E.g.:
@@ -56,30 +58,33 @@ to the Dashboard from a browser on your Vagrant host, you will need to set
5658
`BIND_PROXY` to `true` in your `.env.local` file.
5759

5860
To access the Kubernetes Dashboard, remember to use `localhost` or `127.0.0.1`
59-
in the URL, i.e. <http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/>.
61+
in the URL, i.e. <http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/>.
62+
To obtain token from any Master node, you may run: `kubectl -n kubernetes-dashboard get secret -o=jsonpath='{.items[?(@.metadata.annotations.kubernetes\.io/service-account\.name=="kubernetes-dashboard")].data.token}' | base64 --decode`
6063

61-
## About the Vagrantfile
64+
## About the `Vagrantfile`
6265

6366
The VMs communicate via a private network:
6467

65-
- Controller node (if any): 192.168.99.100
66-
- Master node i: 192.168.99.(100+i) / master*i*.vagrant.vm
67-
- Worker node i: 192.168.99.(110+i) / worker*i*.vagrant.vm
68+
- Controller node IP: 192.168.99.100 (if `STANDALONE_OPERATOR=true`)
69+
- Master node _i_: 192.168.99.(100+ _i_ ) / master *_i_* .vagrant.vm
70+
- Worker node _i_: 192.168.99.(110+ _i_ ) / worker *_i_* .vagrant.vm
71+
- Master Virtual IP: 192.168.99.99 (if `MULTI_MASTER=true`)
72+
- LoadBalancer IPs: 192.168.99.240 - 192.168.99.250 (if `DEPLOY_METALLB=true`)
6873

6974
## Configuration
7075

71-
The Vagrantfile can be used _as-is_; there are a couple of parameters you
76+
The `Vagrantfile` can be used _as-is_; there are a couple of parameters you
7277
can set to tailor the installation to your needs.
7378

7479
### How to configure
7580

7681
There are several ways to set parameters:
7782

78-
1. Update the Vagrantfile. This is straightforward; the downside is that you
83+
1. Update the `Vagrantfile`. This is straightforward; the downside is that you
7984
will lose changes when you update this repository.
80-
1. Use environment variables. Might be difficult to remember the parameters
85+
2. Use environment variables. Might be difficult to remember the parameters
8186
used when the VM was instantiated.
82-
1. Use the `.env`/`.env.local` files (requires
87+
3. Use the `.env`/`.env.local` files (requires
8388
[vagrant-env](https://github.com/gosuri/vagrant-env) plugin). Configure
8489
your cluster by editing the `.env` file; or better copy `.env` to `.env.local`
8590
and edit the latter one, it won't be overridden when you update this repository
@@ -89,46 +94,58 @@ local configuration!)
8994
Parameters are considered in the following order (first one wins):
9095

9196
1. Environment variables
92-
1. `.env.local` (if [vagrant-env](https://github.com/gosuri/vagrant-env) plugin
97+
2. `.env.local` (if [vagrant-env](https://github.com/gosuri/vagrant-env) plugin
9398
is installed)
94-
1. `.env` (if [vagrant-env](https://github.com/gosuri/vagrant-env) plugin
99+
3. `.env` (if [vagrant-env](https://github.com/gosuri/vagrant-env) plugin
95100
is installed)
96-
1. Vagrantfile definitions
101+
4. `Vagrantfile` definitions
97102

98103
### VM parameters
99104

100105
- `VERBOSE` (default: `false`): verbose output during VM deployment.
101-
- `MEMORY` (default: 3072): all VMs are provisioned with 3GB memory.
102-
- `VB_GROUP` (default: `OLCNE`): group all VirtualBox VMs under this label.
103-
- `EXTRA_DISK` (default: `false`): Creates an extra disk (/dev/sdb) that can be used for GlusterFS for Kubernetes Persistent Volumes
106+
- `WORKER_CPUS` (default: `1`): Provision Worker Node with 1 vCPU.
107+
- `WORKER_MEMORY` (default: `1024`): Provision Worker Node with 1GB memory.
108+
- `MASTER_CPUS` (default: `2`): At least 2 vCPUS are required for Master Nodes.
109+
- `MASTER_MEMORY` (default: `2048`): At least 1700MB are required for Master Nodes.
110+
- `OPERATOR_CPUS` (default: `1`): Only applicable if `STANDALONE_OPERATOR=true` or `MULTI_MASTER=true`.
111+
- `OPERATOR_MEMORY` (default: `1024`): Only applicable if `STANDALONE_OPERATOR=true` or `MULTI_MASTER=true`.
112+
- `VB_GROUP` (default: `OCNE`): group all VirtualBox VMs under this label.
113+
- `EXTRA_DISK` (default: `false`): Creates an extra disk (`/dev/sdb`) on Worker nodes that can be used for GlusterFS for Kubernetes Persistent Volumes
104114

105115
### Cluster parameters
106116

107-
- `STANDALONE_OPERATOR` (default: `false`): create a separate VM for the
108-
operator node -- default is to install the operator components on the (first)
109-
master node.
117+
- `STANDALONE_OPERATOR` (default: `false` unless `MULTI_MASTER=true`): create
118+
a separate VM for the operator node -- default is to install the operator
119+
components on the (first) master node.
110120
- `MULTI_MASTER` (default: `false`): multi-master setup. Deploy 3 masters in
111121
HA mode.
112-
- `NB_WORKERS` (default: 2): number of worker nodes to provision.
122+
- `NB_WORKERS` (default: `2`): number of worker nodes to provision.
113123
At least one worker node is required.
114124
- `BIND_PROXY` (default: `false`): bind the kubectl proxy port (8001) from the
115125
(first) master to the Vagrant host. This is required if you want to access the
116126
Kubernetes Dashboard from a browser on your host.
117127
__Note__: you only need this if you want to expose the kubectl proxy to other
118128
hosts in your network.
129+
- `DEPLOY_HELM` (default: `false`): deploys the Helm module.
130+
- `DEPLOY_ISTIO` (default: `false`): deploys the Istio and Helm modules.
131+
- `DEPLOY_METALLB` (default: `false`): deploys the MetalLB and Helm modules.
132+
- `DEPLOY_GLUSTER` (default: `false`): deploys the Gluster and Helm modules.
133+
__Note__: if `NB_WORKERS` is less than `3`, the `hyperconverged` `storageclass`
134+
is patched to adjust the number of Gluster replicas accordingly.
135+
__Note__: This provisioning script also installs Heketi on the operator node.
119136

120137
### Repositories
121138

122139
- `YUM_REPO` (default: none): additional yum repository to consider
123140
(e.g. local repo)
124-
- `OLCNE_DEV` (default: `false`): whether to enable the Oracle Linux Cloud
141+
- `OCNE_DEV` (default: `false`): whether to enable the Oracle Cloud
125142
Native Environment developer channel.
126-
- `REGISTRY_OLCNE` (default: `container-registry.oracle.com/olcne`): Container
127-
registry for Oracle Linux Cloud Native Environment images.
143+
- `REGISTRY_OCNE` (default: `container-registry.oracle.com/olcne`): Container
144+
registry for Oracle Cloud Native Environment images.
128145

129146
For performance reasons, we recommend using the closest Oracle Container Registry mirror to your region. A list of available regions can be found on the [Regions and Availability Domains](https://docs.cloud.oracle.com/en-us/iaas/Content/General/Concepts/regions.htm) page of the Oracle Cloud Infrastructure documentation.
130147

131-
To specify an Oracle Container Registry mirror, either edit the Vagrantfile or install the vagrant-env plugin and create a .env.local file that specifies the mirror.
148+
To specify an Oracle Container Registry mirror, either edit the `Vagrantfile` or install the vagrant-env plugin and create a `.env.local` file that specifies the mirror.
132149

133150
The following syntax can be used to specify a mirror:
134151

@@ -145,16 +162,18 @@ Mainly used for development.
145162

146163
- The following parameters can be set to use specific component version:
147164
`OLCNE_VERSION`, `NGINX_IMAGE`.
148-
- `NB_MASTERS` (default: none): override number of masters to deploy.
165+
- `NB_MASTERS` (default: none): override number of masters to deploy. Requires `MULTI_MASTER=true` to function properly.
166+
- `SUBNET` (default: `192.168.99`): Set the VM provider host-only / private network subnet.
167+
- `UPDATE_OS` (default: false): Runs `dnf -y update` on the VM.
149168

150169
## Optional plugins
151170

152-
When installed, this Vagrantfile will make use of the following third party Vagrant plugins:
171+
When installed, this `Vagrantfile` will make use of the following third party Vagrant plugins:
153172

154173
- [vagrant-env](https://github.com/gosuri/vagrant-env): loads environment
155174
variables from .env files;
156175
- [vagrant-hosts](https://github.com/oscar-stack/vagrant-hosts): maintains
157-
/etc/hosts for the guest VMs;
176+
`/etc/hosts` for the guest VMs;
158177
- [vagrant-proxyconf](https://github.com/tmatilai/vagrant-proxyconf): set
159178
proxies in the guest VMs if you need to access the Internet through proxy. See
160179
plugin documentation for the configuration.
@@ -167,9 +186,9 @@ vagrant plugin install <name>...
167186

168187
## Product Documentation
169188

170-
- [Oracle Linux Cloud Native Environment: Getting Started](https://docs.oracle.com/en/operating-systems/olcne/start/index.html)
171-
- [Oracle Linux Cloud Native Environment: Using Container Orchestration](https://docs.oracle.com/en/operating-systems/olcne/orchestration/index.html)
172-
- [Oracle Linux Cloud Native Environment: Using Container Runtimes](https://docs.oracle.com/en/operating-systems/olcne/runtimes/index.html)
189+
- [Oracle Cloud Native Environment: Getting Started](https://docs.oracle.com/en/operating-systems/olcne/start/index.html)
190+
- [Oracle Cloud Native Environment: Using Container Orchestration](https://docs.oracle.com/en/operating-systems/olcne/orchestration/index.html)
191+
- [Oracle Cloud Native Environment: Using Container Runtimes](https://docs.oracle.com/en/operating-systems/olcne/runtimes/index.html)
173192

174193
## Feedback
175194

0 commit comments

Comments
 (0)