Skip to content

Commit

Permalink
Merge pull request #155 from oracle/sprint-11
Browse files Browse the repository at this point in the history
Sprint 11
  • Loading branch information
toxophilist authored Oct 27, 2020
2 parents 0b11fe4 + 2f95b85 commit be4cc98
Show file tree
Hide file tree
Showing 6 changed files with 325 additions and 127 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
1. Read Load Balancer Shapes from OCI / Cached OCI Values
2. Simple Command Line generator (visualiser/okit_generator) to convert OKIT.
3. Add MySQL Resource / Artefact.
4. Add Cost Estimation functionality for the designed model. This is based on the Oracle public APIs.
4. Add Cost Estimation functionality for the designed model. This is based on the Oracle public APIs.
5. Add top-level Dockerfile and update Runtime build documentation.
6. Enable Instance Principal Authentication for Query/Resource Manager.

### Bug Fixes
1. Build script on Windows fail (Issue: #135)
2. Instances were picking up Network Security Groups assined to Autonomous Database during Terraform generation.

## Version 0.12.0
**Release Date**: 7th October 2020
Expand Down
61 changes: 43 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,52 @@ OCI environments through a graphical web based interface.
## Installation
Detailed OKIT Installation steps can be found in the [OCI Designer Toolkit Installation Guide](documentation/Installation.md).

### Quick Start
The docker image is the recommended runtime server OKIT provides a simple Docker Compose script to build and start the container.
_Note:_
```diff
- OKIT is designed to be installed as a local single user container and it is recommended that you
- do NOT install OKIT on an OCI Instance. Installing on an OCI Instance will leave you OCI Tenancy
- open to anyone who can find the IP address. If you do decide to install on an OCI Instance the
- OCI Designer Toolkit Installation Guide will give some recommendations for securing your Instance.
```

### Runtime Quick Start
[Docker](https://www.docker.com/products/docker-desktop) is the recommended runtime container for OKIT. The project contains a top-level Dockerfile to facilitate direct
building, of the runtime environment, from the docker command line.

#### Prerequisites
Before building / running OKIT you will need to install [Docker / Docker Desktop](https://www.docker.com/products/docker-desktop).

#### Build Docker Container
```bash
docker build --tag okit --force-rm https://github.com/oracle/oci-designer-toolkit.git
```

#### Create / Generate Connection Information
If you already have the OCI sdk/cli installed on you machine you can use the previously generated pem key and config file
we will assume that this exists in <USER HOME DIR>/.oci

##### Key File

#### Clone Repository
If you do not have a previously generated private key you will need to create a private/public key pair for use with OKIT and OCI.
These keys can be generated using the following commands as defined in [Required Keys and OCIDs](https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm).

```bash
openssl genrsa -out <USER HOME DIR>/.oci/oci_api_key.pem 2048
openssl rsa -pubout -in <USER HOME DIR>/.oci/oci_api_key.pem -out <USER HOME DIR>/.oci/oci_api_key_public.pem
```

Upload the generated __oci_api_key_public.pem__ to OCI through the [console](https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm) and record the associated fingerprint following upload.

###### Get Fingerprint
```bash
git clone --depth 1 https://github.com/oracle/oci-designer-toolkit.git
openssl rsa -pubout -outform DER -in ~/.oci/oci_api_key.pem | openssl md5 -c
```

#### Create Config File
##### Config File

Create the OCI cli __config__ file in the directory __oci-designer-toolkit/containers/oci__ with contents similar to that below.
The __*key_file*__ is a fixed value because the contents of the __oci-designer-toolkit/containers/oci__ will be copied to the
appropriate users home directory, as __~/.oci__, during the build process.
Create the OCI cli __config__ file in the directory __&lt;USER HOME DIR&gt;/.oci__ with contents similar to that below.
The __*key_file*__ is a fixed value because the contents of the __&lt;USER HOME DIR&gt;/.oci__ will be mounted to the
appropriate users home directory, as __~/.oci__, during the run process.

```properties
[DEFAULT]
Expand All @@ -57,20 +90,12 @@ tenancy=ocid1.tenancy.oc1..aaaaaaaawpqblfem........
region=us-phoenix-1
```

#### Copy Key File

Copy your __oci_api_key.pem__ to the __oci-designer-toolkit/containers/oci__ directory.

#### Build and Start
#### Run Container

```bash
cd oci-designer-toolkit/containers/docker
docker-compose up --detach
docker run -d --rm -p 80:80 --volume <USER HOME DIR>/okit/user/templates:/okit/templates --volume <USER HOME DIR>/.oci:/root/.oci --name okit okit
```

__*Note:*__ For full connection to OCI you will need to follow the [Installation Create Config File instruction](documentation/Installation.md#oci-config-file)
prior to building.

Once started the Designer BUI can be accessed on [http://localhost/okit/designer](http://localhost/okit/designer)


Expand Down
Loading

0 comments on commit be4cc98

Please sign in to comment.