Giter Site home page Giter Site logo

oracle / oci-designer-toolkit Goto Github PK

View Code? Open in Web Editor NEW
257.0 33.0 119.0 22.78 MB

OCI designer toolKIT (OKIT) is a set of tools for enabling design, deploy and visualise OCI environments through a graphical web based interface.

License: Universal Permissive License v1.0

Shell 0.16% Dockerfile 0.14% Python 14.14% JavaScript 45.91% CSS 2.73% HTML 3.43% PowerShell 0.04% Jinja 5.23% HCL 0.13% TypeScript 28.10%
oci oci-terraform-modules oci-cli okit oci-designer oci-toolkit visualise-oci-environments oci-ansible

oci-designer-toolkit's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oci-designer-toolkit's Issues

Vagrant does not work the second time

I followed the instructions for creating a Vagrant image and it worked successfully the first time. However, when I ran today with 'vagrant up; vagrant ssh', and I navigated to http://localhost/okit/designer on my browser, it gives me Internal Server Error. After I built the image, I see the following that the okit folder is empty:
[vagrant@okit-vagrant ~]$ ls
okit
[vagrant@okit-vagrant ~]$ cd okit/
[vagrant@okit-vagrant okit]$ ls
[vagrant@okit-vagrant okit]$ hostname
okit-vagrant
[vagrant@okit-vagrant okit]$ whoami
vagrant
[vagrant@okit-vagrant okit]$
Am I missing something here? Or did something get deleted?

Unable to upgrade to latest version (v0.10.2)

Hi team,

I'm trying to use the latest version of OKIT, but when I start the docker image and open the UI I just see this on the UI:

image

Versions

OKIT Version: v0.10.2 (although OKIT UI shows v0.9.2)
Browser: Chrome 85.0.4183.83

Steps to reproduce:

  1. Clone repo
  2. Execute docker-compose up
  3. Open OKIT UI
  4. UI shows an incorrect version (v0.9.2) on the left bottom of the page

Note: I have tried both branches v0.10.2 and master. and start the container again, but same behaviour.

What am I doing wrong?

Thanks for your help

ENH REQ: Have an export option to export to Git for integration with Resource Manager

This might be an odd one but some users would like to be able to export to a Git respository and then have RM build a stack from there. Currently it is not possible without configuration changes to have exported tf be pushed to a git repository and then have Oracle Resource manager utilise it.

Might be nice to allow this to happen especially as this is what is done when okit exports directly to RM.

DynamicRoutingGateway error on querying "getBoundingClientRect"

Still getting the DRG error when querying unfortunately after the new release 0.10.0

dynamic_routing_gateway.js:33 Uncaught TypeError: Cannot read property 'getBoundingClientRect' of null
    at DynamicRoutingGatewayView.draw (dynamic_routing_gateway.js:33)
    at OkitDesignerJsonView.draw (okit_designer_view.js:76)
    at displayDesignerView (okit_designer.js:646)
    at redrawSVGCanvas (okit_designer.js:251)
    at OkitOCIQuery.complete_callback (okit_designer.js:505)
    at OkitOCIQuery.isComplete (okit_query.js:42)
    at Object.success (okit_query.js:375)
    at fire (jquery-3.4.1.js:3291)
    at Object.fireWith [as resolveWith] (jquery-3.4.1.js:3421)
    at done (jquery-3.4.1.js:9533)

image

Issue with ansible code in main.yml when creating tcp options

OKIt v 0.8.0
When: Create a diagram with security list having ingress or egress rule with tcp options. After exporting this into ansible, the main.yml shows max and min variables without quotes. This is causing issues with parsing yaml. Once i put them in quotes the issue gets resolved.
For example:
+--------------------------------------+
tcp_options:
destination_port_range:
min: {{ Okit_Sl002_ingress_rule_01_tcp_dst_min }}
max: {{ Okit_Sl002_ingress_rule_01_tcp_dst_max }}
# Required
- protocol: "{{ Okit_Sl002_ingress_rule_02_protocol }}"
source: "{{ Okit_Sl002_ingress_rule_02_source }}"
# Optional
source_type: "{{ Okit_Sl002_ingress_rule_02_source_type }}"
tcp_options:
destination_port_range:
min: {{ Okit_Sl002_ingress_rule_02_tcp_dst_min }}
max: {{ Okit_Sl002_ingress_rule_02_tcp_dst_max }}
# Optional
+--------------------------------------+

gateway creation issues

I am using okit 0.9.1 version

After creating 2 vcns, add internet gateway, nat gateway and service gateway, but only 1 gateway is created.

For example
If you create an internet gateway in vcn1, you cannot create an internet gateway in vcn2.

Shapes are wrongly reports

A VMstandard shape show "undefined OCPU"
A E2.1 shape shows 4 OCPU -> this should be 1 OCPU or 2 vCPU
A VMstandard 1.1 shows 8 OPCU, should be 1
B1.1 show 2 should be 1
B1.6 shows 4 should be 16

etc...

Vagrant image failes to install V0.9.2

Hi when I try to install the latest 0.9.2 version it gives an error
This is snipped from the install:

okit-vagrant: ============== Running privileged commands ==============

==> okit-vagrant: Running provisioner: shell...
okit-vagrant: Running: inline script
==> okit-vagrant: Running provisioner: file...
okit-vagrant: ../../okitweb => /okit/okitweb
==> okit-vagrant: Running provisioner: file...
okit-vagrant: ../../visualiser => /okit/visualiser
==> okit-vagrant: Running provisioner: file...
okit-vagrant: ../oci => /okit/config
==> okit-vagrant: Running provisioner: shell...
okit-vagrant: Running: inline script
==> okit-vagrant: Running provisioner: shell...
okit-vagrant: Running: inline script
==> okit-vagrant: Running provisioner: shell...
okit-vagrant: Running: inline script
okit-vagrant: chmod:
okit-vagrant: cannot access ‘/root/.oci/*.pem’
okit-vagrant: : No such file or directory

It does not looks like something I address

Regards
Mads

not able to run docker image using '-it' in the run command

Hi

I am trying to setup okit but in the last command which i use

sudo docker run -it --rm -p 80:80
--name okit
--hostname okit
-v ~/.oci:/root/.oci
-v pwd/okitweb:/okit/okitweb
-v pwd/visualiser:/okit/visualiser
-v pwd/log:/okit/log
okit

I am m stuck after this command. The command does not execute properly and just stays at

Successfully tagged okit:latest
[opc@okit-instance oci-designer-toolkit]$ sudo docker run -it --rm -p 80:80 \

       --name okit \
       --hostname okit \
       -v ~/.oci:/root/.oci \
       -v `pwd`/okitweb:/okit/okitweb \
       -v `pwd`/visualiser:/okit/visualiser \
       -v `pwd`/log:/okit/log \
       okit

[2020-06-17 17:42:34 +0000] [1] [INFO] Starting gunicorn 20.0.4
[2020-06-17 17:42:34 +0000] [1] [INFO] Listening at: http://0.0.0.0:80 (1)
[2020-06-17 17:42:34 +0000] [1] [INFO] Using worker: sync
[2020-06-17 17:42:34 +0000] [8] [INFO] Booting worker with pid: 8
[2020-06-17 17:42:34 +0000] [9] [INFO] Booting worker with pid: 9

after closing the command i get:

^C[2020-06-17 17:43:03 +0000] [1] [INFO] Handling signal: int
[2020-06-17 17:43:03 +0000] [8] [INFO] Worker exiting (pid: 8)
[2020-06-17 17:43:03 +0000] [9] [INFO] Worker exiting (pid: 9)
[2020-06-17 17:43:03 +0000] [1] [INFO] Shutting down: Master

and when I use the above command with -d, it shows:

[opc@okit-instance oci-designer-toolkit]$ sudo docker run -d --rm -p 80:80 \

       --name okit \
       --hostname okit \
       -v $OCI_CONFIG_DIR:/root/.oci:Z \
       -v $OKIT_ROOT_DIR/okitweb:/okit/okitweb:Z \
       -v $OKIT_ROOT_DIR/visualiser:/okit/visualiser:Z \
       -v $OKIT_ROOT_DIR/log:/okit/log:Z \
       okit

b6d01ccf2e9f7437dcfaed9394284953f587587ad139ff0932847bc66e05149c

But I am still not able to access the okit.

Please help!!!
Thanks

Error trying to deploy HA Web Application architecture template

Hi,

I'm trying to deploy HA Web Aplication Reference Architecture template but I'm having the following error :

image

Versions

OKIT Version: v0.10.2
Browser: Chrome 85.0.4183.83

Steps to reproduce

  1. Open HA Web Application template (Menu-> Templates-> Reference Architecture -> HA Web Application)
  2. Specify public keys for DB System, webhosts (1 and 2) and bastion instances.
  3. Export via Resource Manager (Menu-> Export-> Resource Manager)
  4. Leave options default (create and plan), then click Create Stack
  5. See the popup with the error message:
Export to Resource Manager Failed (INTERNAL SERVER ERROR)
  1. On the log I can see this error:
okit    | INFO: Processing Route Table Information Okit_Rt003
okit    | INFO: Processing Subnet Information Ha_Web_Public_Sn
okit    | INFO: Processing Subnet Information Ha_Web_Private_Sn
okit    | INFO: Processing Subnet Information Ha_Web_Db_Sn
okit    | INFO: Processing Database System Information Hawebdb
okit    | ERROR: '>' not supported between instances of 'str' and 'int'
okit    | Traceback (most recent call last):
okit    |   File "/okit/okitweb/okitOci.py", line 110, in ociResourceManger
okit    |     generator.generate()
okit    |   File "/okit/visualiser/generators/okitGenerator.py", line 194, in generate
okit    |     self.renderDatabaseSystem(database_system)
okit    |   File "/okit/visualiser/generators/okitGenerator.py", line 371, in renderDatabaseSystem
okit    |     if database_system["cpu_core_count"] > 0:
okit    | TypeError: '>' not supported between instances of 'str' and 'int'

Note: On v0.9.2 I was able to deploy without any issues.

Thanks for your help

ENH REQ: Need ability to rearrange icons from query output

requesting ability to rearrange the icons displayed when querying a tenancy. For example I have about 10-15 compute instances running in compartment and querying the compartment gives me display which has compute instances stack horizontal. It is really difficult to view or present the output... see sample below

image

IPSec Option missing

I see that the pallete has the option for FastConnect but I don't see IPSec VPN option, though i see the list properties of DRG showing that.

Console log tells me that the OKIT is looking for a .pem file

The console from where I executed ./start-okit-server.sh loks like this:

atael@atael-mac docker % ./start-okit-server.sh
OCI_CONFIG_DIR has not been set using /Users/atael/.oci
OKIT_OUTPUT_DIR has not been set using /Users/atael/github/oci-designer-toolkit/output



==========================================================================
=====  Runtime : gunicorn                                            =====
=====  Version : 0.5.0                                               =====
=====  Image   : okit/0.5.0/webserver                                =====
==========================================================================



[2020-05-13 20:35:58 +0000] [1] [INFO] Starting gunicorn 20.0.4
[2020-05-13 20:35:58 +0000] [1] [INFO] Listening at: http://0.0.0.0:80 (1)
[2020-05-13 20:35:58 +0000] [1] [INFO] Using worker: sync
[2020-05-13 20:35:58 +0000] [8] [INFO] Booting worker with pid: 8
[2020-05-13 20:35:58 +0000] [9] [INFO] Booting worker with pid: 9
INFO: Fragment : bastion_server.svg
INFO: Fragment full : /okit/okitweb/static/okit/fragments/svg/bastion_server.svg
INFO: Icon : {'svg': 'bastion_server.svg', 'title': 'Bastion Server'}
INFO: Fragment : load_balanced_nginx.svg
INFO: Fragment full : /okit/okitweb/static/okit/fragments/svg/load_balanced_nginx.svg
INFO: Icon : {'svg': 'load_balanced_nginx.svg', 'title': 'Load Balanced Nginx'}
INFO: Reading Json File : /okit/okitweb/static/okit/templates/infrastructure/bastion_server.json
INFO: Reading Json File : /okit/okitweb/static/okit/templates/network/load_balanced_nginx.json
INFO: Reading Json File : /okit/okitweb/static/okit/templates/network/simple_load_balancer.json
INFO: Reading Json File : /okit/okitweb/static/okit/templates/reference_architecture/cockroachdb_cluster.json
INFO: Reading Json File : /okit/okitweb/static/okit/json/dropdown.json
ERROR: [Errno 2] No such file or directory: '/Users/atael/.ssh/oci_api_key.pem'
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/okit/okitweb/okitWebDesigner.py", line 451, in dropdownQuery
    oci_shapes = OCIShapes()
  File "/okit/visualiser/facades/ociShape.py", line 31, in __init__
    super(OCIShapes, self).__init__(config=config, configfile=configfile, profile=profile)
  File "/okit/visualiser/facades/ociConnection.py", line 95, in __init__
    super(OCIComputeConnection, self).__init__(config=config, configfile=configfile, profile=profile)
  File "/okit/visualiser/facades/ociConnection.py", line 47, in __init__
    self.connect()
  File "/okit/visualiser/facades/ociConnection.py", line 98, in connect
    self.client = oci.core.ComputeClient(self.config)
  File "/usr/local/lib/python3.6/site-packages/oci/core/compute_client.py", line 73, in __init__
    private_key_content=config.get("key_content")
  File "/usr/local/lib/python3.6/site-packages/oci/signer.py", line 226, in __init__
    self.private_key = load_private_key_from_file(private_key_file_location, pass_phrase)
  File "/usr/local/lib/python3.6/site-packages/oci/signer.py", line 27, in load_private_key_from_file
    with io.open(filename, mode="rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/atael/.ssh/oci_api_key.pem'
^C[2020-05-13 20:36:43 +0000] [1] [INFO] Handling signal: int
[2020-05-13 20:36:43 +0000] [9] [INFO] Worker exiting (pid: 9)
[2020-05-13 20:36:43 +0000] [8] [INFO] Worker exiting (pid: 8)
[2020-05-13 20:36:44 +0000] [1] [INFO] Shutting down: Master
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS                     PORTS               NAMES
ddf8f1ea3120        oracle/database:18.4.0-xe   "/bin/sh -c 'exec $O…"   6 weeks ago         Exited (137) 6 weeks ago                       db1840xe

Not sure why it is looking for the file /Users/atael/.ssh/oci_api_key.pem

The file exists:

atael@atael-mac docker % ls /Users/atael/.ssh/oci_api_key.pem
/Users/atael/.ssh/oci_api_key.pem

okit cannot access oci cli private key file, causes "file not found" error

Running as Docker

ls -la ~/.oci
total 24
-rw------- 1 mrinne staff 306 May 19 14:14 config
-rw------- 1 mrinne staff 1679 May 19 14:14 oci_api_key.pem
-rw------- 1 mrinne staff 451 May 19 14:14 oci_api_key_public.pem

export OCI_CONFIG_DIR=~/.oci
docker run -it --rm -p 80:80
--name okit
--hostname okit
-v ~/.oci:/root/.oci:Z
-v pwd/okitweb:/okit/okitweb:Z
-v pwd/visualiser:/okit/visualiser:Z
-v pwd/log:/okit/log:Z
okit

[2020-05-19 11:48:25 +0000] [1] [INFO] Starting gunicorn 20.0.4
[2020-05-19 11:48:25 +0000] [1] [INFO] Listening at: http://0.0.0.0:80 (1)
[2020-05-19 11:48:25 +0000] [1] [INFO] Using worker: sync
[2020-05-19 11:48:25 +0000] [8] [INFO] Booting worker with pid: 8
[2020-05-19 11:48:25 +0000] [9] [INFO] Booting worker with pid: 9
INFO: Using Profile : DEFAULT
INFO: Compartment Name sefinland
ERROR: [Errno 2] No such file or directory: '/Users/mrinne/.oci/oci_api_key.pem'

Why the pk file is not found ?
It is found from the path:

cat /Users/mrinne/.oci/oci_api_key.pem
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAox/ywWkZjmpyChyT8Bthvhs5ZdAef1IqxhWH8a+I2gFfmoQH
VJqapOIE7To4fILEUaYcr0kHkA6VgocPX7qeCsfwRGeEec/aAXPIlD9OSlklvAQx
...

Public key uploaded to the profile and oci cli works. Root compartment names are equal (okit and cloud).

Thanks

Add DB Systems VM/BM

I can´t add DB Systems icon to my draw design.This one will be added in next update?

Vagrant install fails (flask.service error)

I am trying to install OCI-desiger-toolkit usign vagrant on a Windows 10 laptop with Virtual box.
the machine creates and all looks fine until the "flask service" starts:
okit-vagrant: ‘/tmp/flask.service’ -> ‘/etc/systemd/system/flask.service’
okit-vagrant: Created symlink from /etc/systemd/system/multi-user.target.wants/flask.service to /etc/systemd/system/flask.service.
okit-vagrant: Job for flask.service failed because a timeout was exceeded. See "systemctl status flask.service" and "journalctl -xe" for details.
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above.

systemctl status flask.service:
[vagrant@okit-vagrant ~]$ systemctl status flask.service
● flask.service - Flask daemon
Loaded: loaded (/etc/systemd/system/flask.service; enabled; vendor preset: disabled)
Active: activating (start) since Fri 2020-05-15 08:30:31 UTC; 1min 10s ago
Main PID: 13894 (python3)
CGroup: /system.slice/flask.service
├─13894 /usr/bin/python3 -m flask run --host=0.0.0.0 --port=8080 --no-debugger
└─13897 /usr/bin/python3 -m flask run --host=0.0.0.0 --port=8080 --no-debugger

May 15 08:30:31 okit-vagrant systemd[1]: Starting Flask daemon...
May 15 08:30:32 okit-vagrant python3[13894]: * Serving Flask app "okitweb" (lazy loading)
May 15 08:30:32 okit-vagrant python3[13894]: * Environment: production
May 15 08:30:32 okit-vagrant python3[13894]: WARNING: This is a development server. Do not use it in a productio...ment.
May 15 08:30:32 okit-vagrant python3[13894]: Use a production WSGI server instead.
May 15 08:30:32 okit-vagrant python3[13894]: * Debug mode: on
May 15 08:30:32 okit-vagrant python3[13894]: * Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)
May 15 08:30:32 okit-vagrant python3[13894]: * Restarting with stat
Hint: Some lines were ellipsized, use -l to show in full.

If I try to stop the service with the vagrant user I get this error:
[vagrant@okit-vagrant ~]$ systemctl stop flask.service
Failed to stop flask.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status flask.service' for details.

I am stuck I do not know how to resolve this.
I have attached the entire install log if it is needed.
error.txt
I hope this can get resolved
Thanks
Mads

ERROR: object of type 'NoneType' has no len()

Not able to generate terraform code while having autonomous data warehouse services exists in the layout.

okit | ERROR: object of type 'NoneType' has no len()
okit | Traceback (most recent call last):
okit | File "/okit/okitweb/okitWebDesigner.py", line 227, in generate
okit | generator.generate()
okit | File "/okit/visualiser/generators/okitGenerator.py", line 188, in generate
okit | self.renderAutonomousDatabase(autonomous_database)
okit | File "/okit/visualiser/generators/okitGenerator.py", line 236, in renderAutonomousDatabase
okit | if len(autonomous_database['whitelisted_ips']):
okit | TypeError: object of type 'NoneType' has no len()

Easier way to use it under Windows ?

I mean our Oracle Windows image that we have on our company laptops which doesn't support WSL2 so I cannot run Linux and run the docker with Linux kernel...

any simple suggestion would be very welcome...

many thnx in advance
-Cla

Autonomous Database needs ability to use VCN/Subnet

Autonomous Databases allow 2 types of access to them.

OKIT currently supports the secure access from everywhere approach but does not allow Virtual Cloud Network access.

This type of access is required for some of the Reference Architectures Oracle have written.

Service Gateway related route rules do not allow setting a Destination Service

Service Gateway related route rules do not allow setting a Destination Service.
It is possible to select a specific destination service within a route rule relating to a service gateway. It is currently not possible to do this in OKIT and therefore not able to be provisioned or queried. This results in incorrect deployments which can lead to fails.

DynamicRoutingGateway error on querying

Hi, I cannot query an existing VCN due to an error on DRG

Drawing Dynamic Routing Gateway : ***drg (ocid1.drg.oc1.ap-sydney***) [undefined]
dynamic_routing_gateway.js:100 Uncaught TypeError: Cannot read property 'getChildOffset' of undefined
    at DynamicRoutingGatewayView.getSvgDefinition (dynamic_routing_gateway.js:100)
    at DynamicRoutingGatewayView.draw (okit_view.js:976)
    at DynamicRoutingGatewayView.draw (dynamic_routing_gateway.js:30)
    at OkitDesignerJsonView.draw (okit_designer_view.js:80)
    at displayDesignerView (okit_designer.js:645)
    at redrawSVGCanvas (okit_designer.js:251)
    at okit_designer_ready.js:299

Need ability to query multiple compartments at a time

We follow standard practice of keeping network and compute/storage/DB etc under separate compartments. using OKIT we can only query one compartment at a time, either NET or compute/storage/DB.
The OKIT show compute/storage/DB etc without VCNs as they are not under same compartment. Need an ability to pick multiple compartments to draw the complete picture.

Pulling the repo can be done via HTTPS too

Cloning the repo can be done via HTTPS too. I have issues using ssh and github so I used the following:

git clone -b v0.5.0 --depth 1 https://github.com/oracle/oci-designer-toolkit.git

Visualizer decoding for OCI instance when not encoded in `utf-8`

instance['metadata']['user_data'] = base64.b64decode(instance['metadata']['user_data']).decode('utf-8')

Support many decoding options

Would like support for any decoding of data to support all possible encodings

Version 0.8.0

Backend Server

This is what I did to temporarily get around the issue, I don't think this is a good approach.

+                try:
+                    instance['metadata']['user_data'] = base64.b64decode(instance['metadata']['user_data']).decode('utf-8')
+                except Exception as error:
+                    logger.info(error)
+                    try:
+                        instance['metadata']['user_data'] = base64.b64decode(instance['metadata']['user_data']).decode('windows-1256')
+                    except Exception as error:
+                        raise error

Error with absolute paths in oci config

When using a full path in the .oci/config file, e.g. key_file=/home/user/.oci/private.pem, the container throws a FileNotFoundError: [Errno 2] No such file or directory: '/home/user/.oci/private.pem'.

This happens because the OCI_CONFIG_DIR is mounted to /root/.oci and the full path no longer works in that context, whereas ~/.oci/private.pem would still work.

Using a full path works fine with the oci cli and the terraform provider. The cli configuration setup page even says key_file=<full-path-to-private-key-pem-file> where <full-path-to-private-key-pem-file> is the full path to the private key file that you created.
Granted, the example on that page also uses ~/.oci/... notation, conflicting with the text.

edit: I guess the problem is, whether full path means absolute path or just not-relative path.

unable to create docker image

when i run this command: docker build --tag okit --file ./containers/docker/Dockerfile --force-rm .
I got following error.

Updated:
ca-certificates.noarch 0:2020.2.41-70.0.el7_8
oraclelinux-release-el7.x86_64 0:1.0-12.el7

Complete!
Loaded plugins: ovl
https://yum.oracle.com/repo/OracleLinux/OL7/oci/included/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.

One of the configured repositories failed (OCI specific release packages Oracle Linux 7Server (x86_64)),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:

 1. Contact the upstream for the repository and get them to fix the problem.

 2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).

 3. Run the command with the repository temporarily disabled
        yum --disablerepo=ol7_ociyum_config ...

 4. Disable the repository permanently, so yum won't use it by default. Yum
    will then just ignore the repository until you permanently enable it
    again or use --enablerepo for temporary usage:

        yum-config-manager --disable ol7_ociyum_config
    or
        subscription-manager repos --disable=ol7_ociyum_config

 5. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice
    compromise:

        yum-config-manager --save --setopt=ol7_ociyum_config.skip_if_unavailable=true

failure: repodata/repomd.xml from ol7_ociyum_config: [Errno 256] No more mirrors to try.
https://yum.oracle.com/repo/OracleLinux/OL7/oci/included/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Removing intermediate container deebc45b3369
The command '/bin/bash -c yum install -y oracle-softwarecollection-release-el7 && yum update -y && yum install -y python36 python3-pip && rm -rf /var/cache/yum && python3 -m pip install --upgrade pip==20.0.2 && pip3 install --no-cache-dir click==7.0 flask==1.1.1 gunicorn==20.0.4 itsdangerous==1.1.0 jinja2==2.10.3 markupsafe==1.1.1 oci==2.6.0 pyyaml==5.2 werkzeug==0.16.0 cryptography==2.8 && mkdir -p /okit/{config,log,visualiser,okitweb,workspace}' returned a non-zero code: 1

Issue with DRG attachment code in OKIT v0.8.0

When creating a DRG, and then exporting the diagram into ansible, the main.yml creates the below and it errors out when parsing the main.yml under "Create DRG attachment". it looks like the objectionable lines are
drg_id = "{{ Okit_Drg001_ocid }}"
vcn_id = "{{ Okit_Vcn001_id }}"

I believe the "=" needs to be replaced by ":"?

here is a part of the main.yml

------ Create Dynamic Routing Gateway

- name: Create Dynamic Routing Gateway okit-drg001
  oci_drg:
    region: "{{ region }}"
    state: "present"
    # Required
    compartment_id: "{{ Okit_Comp002_id }}"
    # Optional
    display_name: "{{ Okit_Drg001_display_name }}"
  register: Okit_Drg001

- set_fact:
    Okit_Drg001_id: "{{ Okit_Drg001.dynamic_routing_gateway.id }}"
    Okit_Drg001_ocid: "{{ Okit_Drg001.dynamic_routing_gateway.id }}"

------ Create DRG Attachment

- name: Create DRG Attachment okit-drg001
  oci_drg_attachment:
    state: "present"
    drg_id = "{{ Okit_Drg001_ocid }}"
    vcn_id = "{{ Okit_Vcn001_id }}"
    # Optional
    display_name: "{{ Okit_Drg001_display_name }}"

- name: Get all the services in a region
  oci_service_facts:
    region: "{{ region }}"
    #name: "{{ Okit_Sg001_service_name }}"
  register: Okit_Sg001Service

Error starting docker image

Hello
I´m getting this error when starting docker image and running with -it option, do you know what could be the cause ?
[2020-05-19 01:28:47 +0000] [1] [INFO] Starting gunicorn 20.0.4
[2020-05-19 01:28:47 +0000] [1] [INFO] Listening at: http://0.0.0.0:80 (1)
[2020-05-19 01:28:47 +0000] [1] [INFO] Using worker: sync
[2020-05-19 01:28:47 +0000] [8] [INFO] Booting worker with pid: 8
[2020-05-19 01:28:47 +0000] [8] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 119, in init_process
self.load_wsgi()
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
return self.load_wsgiapp()
File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/local/lib/python3.6/site-packages/gunicorn/util.py", line 358, in import_app
mod = importlib.import_module(module)
File "/usr/lib64/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'okitweb.wsgi'
[2020-05-19 01:28:47 +0000] [8] [INFO] Worker exiting (pid: 8)
[2020-05-19 01:28:47 +0000] [1] [INFO] Shutting down: Master
[2020-05-19 01:28:47 +0000] [1] [INFO] Reason: Worker failed to boot.

Service Gateway only offers all services when drawn but then provisions Object Storage

Found with Okit 0.11.0

When you place a service gateway on your VCN you only have the choice to set it up for All Services.
Service gateways now offer an alternate service of Object Storage only.

When the service gateway is provisioned with terraform, the resulting service gateway gets created with Object Storage Only. The provisioning needs to be complete and consistent to avoid confusion.

Link to OCI Console should be data driven

The Toolkit UI (top right cloud icon) links to OCI console in phoenix but users may have other home regions eg ap-sydney-1.
The link to OCI Console could potentially be created from the Users oci config file which contains the region?

Error executing: docker-compose up

I am trying to install OCI designer toolkit, I am trying it in an OCI Ubuntu instance. I have followed all the steps indicated in the installation guide, but in the following: docker-compose up
I get the following error:

https://yum.oracle.com/repo/OracleLinux/OL7/oci/included/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
.
.
.
failure: repodata/repomd.xml from ol7_ociyum_config: [Errno 256] No more mirrors to try.
https://yum.oracle.com/repo/OracleLinux/OL7/oci/included/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
ERROR: Service 'okit' failed to build

Could you tell me how to continue?

Thanks and regards.

[QUERY OCI] Not able to query metadata on an existing tenancy

When I try to "query OCI" information, the window is still blocked.
Informations on the Windows are :
Connection Profile : DEFAULT
Region : Retrieving
Compartment : Retrieving

  • OCI CLI is correctly configured on my my server (I can retrieve information on my tenancy).
  • In file "okit-debug.log", I can see the following lines (I masked OCID) :
    2020-07-11 14:32:25,578 [ 12] DEBUG : ociConnection[0043] : >>>>>>>>>>>>>>>> Profile Config : {'log_requests': False, 'additional_user_agent': '', 'pass_phrase': None, 'user': 'ocid1.user.oc1..aaaaaaaxxxxxx', 'fingerprint': '78:49:bc:16:0c:xxxxxxxxxxxxxxxxxx', 'key_file': '/home/opc/.oci/oci_api_key.pem', 'tenancy': 'ocid1.tenancy.oc1..aaaaaaaaisz6b4n6mv7jthdiqg5omuxxxxxxxxxxxxxxxxxx', 'region': 'eu-frankfurt-1'}
    2020-07-11 14:32:25,583 [ 12] DEBUG : ociConnection[0046] : >>>>>>>>>>>>>>>> Merged Config : {'log_requests': False, 'additional_user_agent': '', 'pass_phrase': None, 'user': 'ocid1.user.oc1..aaaaaaaxxxxxx', 'fingerprint': '78:49:bc:16:0c:xxxxxxxxxxxxxxxxxx', 'key_file': '/home/opc/.oci/oci_api_key.pem', 'tenancy': 'ocid1.tenancy.oc1..aaaaaaaaisz6b4n6mv7jthdiqg5omuxxxxxxxxxxxxxxxxxx', 'region': 'eu-frankfurt-1'}

Thanks for your help

Generate not working for queried resources

I am not able to generate terraform/ansible or resource manager files for the queried resources from existing tenancy. Tried two different tenancies.

I am running it as docker on mac using docker engine:19.03.8, compose:1.25.5
All three generate options give the following errors:

ERROR: invalid literal for int() with base 10: 'None'
Traceback (most recent call last):
File "/okit/okitweb/okitWebDesigner.py", line 200, in generate
generator.generate()
File "/okit/visualiser/generators/ociGenerator.py", line 166, in generate
self.renderSubnet(subnet)
File "/okit/visualiser/generators/ociGenerator.py", line 1159, in renderSubnet
if int(str(subnet.get("availability_domain", "0"))) > 0:
ValueError: invalid literal for int() with base 10: 'None'

Instances not retrieved after installing 0.9.2

After upgrading to 0.9.2 (from 0.8.0) I noticed the existing instances are not retrieved from my tenancy; it was working fine from 0.8.0.
Found below error message who seems to point out to code issue (might be region issue though from Zurich)

2020-08-17 14:18:02,217 [ 1012] ERROR : _internal[0122] : Error on request:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/werkzeug/serving.py", line 304, in run_wsgi
execute(self.server.app)
File "/usr/local/lib/python3.6/site-packages/werkzeug/serving.py", line 292, in execute
application_iter = app(environ, start_response)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2463, in call
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2449, in wsgi_app
response = self.handle_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1866, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functionsrule.endpoint
File "/okit/okitweb/okitOci.py", line 230, in ociArtifacts
response_json = oci_instances.list(filter=query_json.get('instance_filter', None))
File "/okit/visualiser/facades/ociInstance.py", line 106, in list
image = OCIImages(config=self.config, configfile=self.configfile, profile=self.profile, compartment_id=compartment_id).get(instance['source_details']['image_id'])
KeyError: 'image_id'

OCI_CONFIG_DIR point to wrong directory

in the Doc for 0.50
export OCI_CONFIG_DIR=/.oci/oci.config . This failed because docker is trying to mount this as a directory it needs to be
export OCI_CONFIG_DIR=
/.oci

Unable to Connect to Localhost

$ ./start-okit-server.sh
OCI_CONFIG_DIR has not been set using /c/Users/RBANERJE/.oci
OKIT_OUTPUT_DIR has not been set using /c/Users/RBANERJE/oci-designer-toolkit/output

==========================================================================
===== Runtime : gunicorn =====
===== Version : 0.5.0 =====
===== Image : okit/0.5.0/webserver =====

the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c43339fbaa76 docker101tutorial "nginx -g 'daemon of…" 52 minutes ago Exited (0) 11 minutes ago
docker-tutorial

RBANERJE-LAP+RBANERJE@RBANERJE-LAP MINGW64 ~/oci-designer-toolkit/docker ((v0.5.0))
$
However, when navigated to http://localhost/okit/designer, I am getting the error 'Unable to connect'. Is there any step I am missing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.