mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
refactor: moved oci-related knowledge articles to the right section
This commit is contained in:
56
knowledge base/cloud computing/oci/README.md
Normal file
56
knowledge base/cloud computing/oci/README.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# Oracle Cloud Infrastructure
|
||||
|
||||
## Table of contents <!-- omit in toc -->
|
||||
|
||||
1. [Concepts](#concepts)
|
||||
1. [Compartments](#compartments)
|
||||
1. [Networking](#networking)
|
||||
1. [Access to the Internet](#access-to-the-internet)
|
||||
1. [Further readings](#further-readings)
|
||||
1. [Sources](#sources)
|
||||
|
||||
## Concepts
|
||||
|
||||
### Compartments
|
||||
|
||||
Compartments are tenancy-wide and extend across regions. They can also be nested to create hierarchies up to 6 levels deep.
|
||||
|
||||
After creating a compartment, you need to write at least one policy for it; until then, no one can access it except administrators or users who have permissions set at the tenancy level. When creating sub-compartments, they inherit access permissions from compartments higher up their hierarchy.
|
||||
|
||||
Before deleting a compartment, all its resources must have been moved, deleted or terminated, including any policies attached to the compartment itself.
|
||||
|
||||
### Networking
|
||||
|
||||
#### Access to the Internet
|
||||
|
||||
| Resource | Used for | Free-tier limit |
|
||||
| ---------------- | -------------------------------------------------------------------------------------------------- | ----------------- |
|
||||
| Internet Gateway | **public** resources that need to **be** reach**ed** from the internet | ? |
|
||||
| NAT Gateway | resources that **need to reach** the internet but **are not reachable from** the internet | 0 (not available) |
|
||||
| Bastion | resources that require Secure Shell (SSH) access but otherwise are not reachable from the internet | 5 |
|
||||
|
||||
## Further readings
|
||||
|
||||
- [`oci-cli`][oci-cli]
|
||||
- [Compute images]
|
||||
- [Connect to private compute instances using OCI Bastion Service]
|
||||
|
||||
## Sources
|
||||
|
||||
All the references in the [further readings] section, plus the following:
|
||||
|
||||
- [Required keys and OCIDs]
|
||||
|
||||
<!--
|
||||
References
|
||||
-->
|
||||
|
||||
<!-- In-article sections -->
|
||||
[oci-cli]: oci-cli.md
|
||||
|
||||
<!-- Upstream -->
|
||||
[compute images]: https://docs.oracle.com/en-us/iaas/images/
|
||||
[required keys and ocids]: https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm
|
||||
|
||||
<!-- Others -->
|
||||
[connect to private compute instances using oci bastion service]: https://medium.com/@harjulthakkar/connect-to-private-compute-instance-using-oci-bastion-service-ca96a3ceea49
|
||||
79
knowledge base/cloud computing/oci/oci-cli.md
Normal file
79
knowledge base/cloud computing/oci/oci-cli.md
Normal file
@@ -0,0 +1,79 @@
|
||||
# OCI CLI
|
||||
|
||||
Oracle Cloud Infrastructure CLI.
|
||||
|
||||
## Table of contents <!-- omit in toc -->
|
||||
|
||||
1. [TL;DR](#tldr)
|
||||
1. [Configuration](#configuration)
|
||||
1. [Further readings](#further-readings)
|
||||
|
||||
## TL;DR
|
||||
|
||||
```sh
|
||||
# Install the CLI.
|
||||
brew install 'oci-cli'
|
||||
|
||||
# Start the interactive setup.
|
||||
oci setup config
|
||||
|
||||
# Generate a key pair to include in the config file.
|
||||
oci setup keys
|
||||
|
||||
# Show the current configuration.
|
||||
cat ~/'.oci/config'
|
||||
|
||||
# List available compartments.
|
||||
oci iam compartment list
|
||||
oci iam compartment list -c 'tenancy_id'
|
||||
|
||||
# Create compartments.
|
||||
oci iam compartment create -c 'root_compartment_id' \
|
||||
--name 'compartment_name' --description 'friendly_description'
|
||||
|
||||
# List available availability domains.
|
||||
oci iam availability-domain list
|
||||
oci iam availability-domain list -c 'tenancy_id'
|
||||
|
||||
# List available compute images.
|
||||
# Output is paginated.
|
||||
oci compute image list -c 'tenancy_id' --all
|
||||
oci compute image list -c 'tenancy_id' \
|
||||
--lifecycle-state 'AVAILABLE' --shape 'VM.Standard.A1.Flex' \
|
||||
--operating-system 'Oracle Linux' --operating-system-version '8' \
|
||||
--sort-by 'DISPLAYNAME' --sort-order 'DESC'
|
||||
|
||||
# List available compute instance plugins.
|
||||
# Requires to be given the OS and its version.
|
||||
oci instance-agent available-plugins get -c 'tenancy_id' \
|
||||
--os-name 'Oracle Linux' --os-version '8'
|
||||
|
||||
# List existing compute instances.
|
||||
oci compute instance list -c 'tenancy_id'
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
| Unix location | Description |
|
||||
| ------------------------ | -------------------------------------------------------------------------------------- |
|
||||
| `~/.oci/config` | The default configuration file. |
|
||||
| `~/.oci/oci_api_key.pem` | Full path and filename of the private key. The key pair **must be in the PEM format**. |
|
||||
|
||||
## Further readings
|
||||
|
||||
- [Oracle Cloud Infrastructure]
|
||||
- [Command Line Interface]
|
||||
- [SDK and CLI Configuration File]
|
||||
- [Required keys and OCIDs]
|
||||
|
||||
<!--
|
||||
References
|
||||
-->
|
||||
|
||||
<!-- Knowledge base -->
|
||||
[oracle cloud infrastructure]: README.md
|
||||
|
||||
<!-- Upstream -->
|
||||
[command line interface]: https://docs.oracle.com/en-us/iaas/Content/API/Concepts/cliconcepts.htm
|
||||
[required keys and ocids]: https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm
|
||||
[sdk and cli configuration file]: https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm
|
||||
Reference in New Issue
Block a user