|
1 | 1 | # oci-o11y-solutions |
2 | 2 | Oracle Observability and Management Solution Templates |
3 | 3 |
|
4 | | -This is an example on how to deploy dashboards in Logging Analytics. |
5 | | -## Deploy Using the Terraform CLI |
6 | | - |
| 4 | +This is an example on how to export, add & deploy dashboards in Logging Analytics. |
| 5 | +## Sharing new Logging Analytics Dashboards |
| 6 | +### Export Dashboard json |
| 7 | +export DASHBOARD_ID=”<OCID….>” |
| 8 | +oci raw-request --http-method GET --target-uri https://managementdashboard.us-phoenix-1.oci.oraclecloud.com/20200901/managementDashboards/${DASHBOARD_ID} | jq .data | jq '.compartmentId = "${compartment_ocid}"' | jq -n -s '{dashboards: inputs}' |
| 9 | + |
7 | 10 | ### Clone the Module |
8 | 11 | Now, you'll want a local copy of this repo. You can make that with the commands: |
9 | 12 |
|
10 | 13 | git clone https://github.com/oracle-quickstart/oci-o11y-solutions.git |
11 | 14 | cd oci-o11y-solutions |
12 | | - ls |
13 | | - |
14 | | -### Prerequisites |
15 | | -First off, you'll need to do some pre-deploy setup for Docker and Fn Project inside your machine: |
16 | | - |
17 | | -``` |
18 | | -sudo su - |
19 | | -yum update |
20 | | -yum install yum-utils |
21 | | -yum-config-manager --enable *addons |
22 | | -yum install docker-engine |
23 | | -groupadd docker |
24 | | -service docker restart |
25 | | -usermod -a -G docker opc |
26 | | -chmod 666 /var/run/docker.sock |
27 | | -exit |
28 | | -curl -LSs https://raw.githubusercontent.com/fnproject/cli/master/install | sh |
29 | | -exit |
30 | | -``` |
31 | | - |
32 | | -### Set Up and Configure Terraform |
33 | | - |
34 | | -1. Complete the prerequisites described [here](https://github.com/cloud-partners/oci-prerequisites). |
35 | | - |
36 | | -2. Create a `terraform.tfvars` file, and specify the following variables: |
37 | | - |
38 | | -``` |
39 | | -# Authentication |
40 | | -tenancy_ocid="<tenancy_ocid>" |
41 | | -auth_type="user" |
42 | | -# Config file is ~/.oci/config |
43 | | -config_file_profile="DEFAULT" |
44 | | -
|
45 | | -# Region |
46 | | -region = "<oci_region>" |
47 | | -
|
48 | | -# Compartment |
49 | | -compartment_ocid = "<compartment_ocid>" |
50 | | -
|
51 | | -### Create the Resources |
52 | | -Run the following commands: |
| 15 | + git branch -b my-branch main |
53 | 16 |
|
54 | | - terraform init |
55 | | - terraform plan |
56 | | - terraform apply |
| 17 | +### Add dashboard files |
| 18 | + cp my-dashboard.json contents/dashboards |
| 19 | + cp my-dashboard.png contents/documentation |
57 | 20 |
|
| 21 | +### Commit and push changes |
| 22 | + git add contents/dashboards/my-dashboard.json |
| 23 | + git add contents/documentation/my-dashboard.png |
| 24 | + git commit -a -m "Adding Dashboard files" |
| 25 | + git push origin my-branch |
58 | 26 |
|
| 27 | +### Create Pull Request |
0 commit comments