Skip to content

Commit c64c257

Browse files
authored
Merge pull request #313 from junior/quick_fixes
Quick fixes
2 parents 8d35747 + e2a18a2 commit c64c257

File tree

24 files changed

+130
-122
lines changed

24 files changed

+130
-122
lines changed

deploy/basic/README.md

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -83,40 +83,15 @@ This creates a `.zip` file in your working directory that can be imported in to
8383
docker buildx build --pull --rm --load -t mushop-basic -f deploy/basic/Dockerfile .
8484
```
8585
86-
Note: Building Multi-Arch and loading locally (using --load) currently is not supported by Docker. You need to build one platform at time.
87-
88-
* linux/amd64
89-
90-
```shell
91-
docker buildx build --pull --rm --platform linux/amd64 --load -t mushop-basic -f deploy/basic/Dockerfile .
92-
```
93-
94-
* linux/arm64
95-
96-
```shell
97-
docker buildx build --pull --rm --platform linux/arm64 --load -t mushop-basic-arm64 -f deploy/basic/Dockerfile .
98-
```
99-
100-
* linux/amd64,linux/arm64 if pushing the mushop builder to local registry:
101-
102-
```shell
103-
docker buildx build --pull --rm --platform linux/amd64,linux/arm64 --push -t <registry>/mushop-basic -f deploy/basic/Dockerfile .
104-
```
105-
10686
1. Run locally
107-
* linux/amd64 (or default builder)
108-
109-
```shell
110-
docker run --rm -it mushop-basic:latest
111-
```
11287
113-
* linux/arm64
88+
```shell
89+
docker run --rm -it -p 8888:80 mushop-basic:latest
90+
```
11491
115-
```shell
116-
docker run --rm -it mushop-basic-arm64:latest
117-
```
92+
1. Browse to http://localhost:8888
11893
119-
## Deploying using local or CloudShell *Terraform* instead of ORM stack
94+
## Deploying using local or OCI CloudShell *Terraform* instead of ORM stack
12095
12196
After complete the Build steps 1 and 2, generate the binaries:
12297

deploy/basic/terraform/.terraform.lock.hcl

Lines changed: 42 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deploy/basic/terraform/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.0
1+
2.1.1

deploy/basic/terraform/compute.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ resource "oci_core_instance" "app_instance" {
3333

3434
metadata = {
3535
ssh_authorized_keys = var.generate_public_ssh_key ? tls_private_key.compute_ssh_key.public_key_openssh : var.public_ssh_key
36-
user_data = data.template_cloudinit_config.nodes.rendered
36+
user_data = data.cloudinit_config.nodes.rendered
3737
}
3838

3939
count = var.num_nodes

deploy/basic/terraform/datasources.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ data "oci_core_services" "all_services" {
122122
}
123123

124124
# Cloud Init
125-
data "template_cloudinit_config" "nodes" {
125+
data "cloudinit_config" "nodes" {
126126
gzip = true
127127
base64_encode = true
128128

deploy/basic/terraform/providers.tf

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,27 @@ terraform {
77
required_providers {
88
oci = {
99
source = "hashicorp/oci"
10-
version = ">= 4.62.0"
11-
# https://registry.terraform.io/providers/hashicorp/oci/4.62.0
10+
version = ">= 4.65.0"
11+
# https://registry.terraform.io/providers/hashicorp/oci/4.65.0
1212
}
1313
local = {
1414
source = "hashicorp/local"
15-
version = "2.1.0" # Latest version as June 2021 = 2.1.0.
15+
version = "2.1.0" # Latest version as February 2022 = 2.1.0.
1616
# https://registry.terraform.io/providers/hashicorp/local/2.1.0
1717
}
1818
random = {
1919
source = "hashicorp/random"
20-
version = "3.1.0" # Latest version as June 2021 = 3.1.0.
20+
version = "3.1.0" # Latest version as February 2022 = 3.1.0.
2121
# https://registry.terraform.io/providers/hashicorp/random/3.1.0
2222
}
2323
tls = {
2424
source = "hashicorp/tls"
25-
version = "3.1.0" # Latest version as June 2021 = 3.1.0.
25+
version = "3.1.0" # Latest version as February 2022 = 3.1.0.
26+
# https://registry.terraform.io/providers/hashicorp/tls/3.1.0
27+
}
28+
cloudinit = {
29+
source = "hashicorp/cloudinit"
30+
version = "2.2.0" # Latest version as February 2022 = 2.2.0.
2631
# https://registry.terraform.io/providers/hashicorp/tls/3.1.0
2732
}
2833
}

deploy/basic/terraform/schema.yaml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2019-2021 Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2019-2022 Oracle and/or its affiliates. All rights reserved.
22
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
33
#
44

@@ -20,10 +20,6 @@ groupings:
2020
- tenancy_ocid
2121
- region
2222

23-
- title: "General Configuration"
24-
variables:
25-
- num_nodes
26-
2723
- title: "Optional Configuration"
2824
variables:
2925
- autonomous_database_name
@@ -43,6 +39,7 @@ groupings:
4339

4440
- title: "Advanced Resource Options - Compute"
4541
variables:
42+
- num_nodes
4643
- instance_shape
4744
- instance_ocpus
4845
- instance_shape_config_memory_in_gbs
@@ -115,6 +112,9 @@ variables:
115112
description: "Choose the number of compute instances to deploy."
116113
default: "2"
117114
required: true
115+
visible:
116+
and:
117+
- show_advanced
118118

119119
autonomous_database_name:
120120
type: string
@@ -521,6 +521,8 @@ outputGroups:
521521
outputs:
522522
- lb_public_url
523523
- lb_nip_host_url
524+
- mushop_source_code
525+
- mushop_version
524526

525527
- title: Passwords and Keys
526528
outputs:
@@ -537,8 +539,6 @@ outputGroups:
537539
outputs:
538540
- dev
539541
- comments
540-
- mushop_source_code
541-
- mushop_version
542542

543543
outputs:
544544
lb_public_url_button:
@@ -549,8 +549,7 @@ outputs:
549549

550550
lb_public_url:
551551
type: link
552-
title: MuShop
553-
displayText: Storefront
552+
title: MuShop URL
554553
visible: true
555554

556555
lb_nip_host_url:
@@ -601,4 +600,4 @@ outputs:
601600
displayText: "The application URL will be unavailable for a few minutes after provisioning, while the application is configured"
602601
visible: true
603602

604-
primaryOutputButton: ${lb_public_url}
603+
primaryOutputButton: ${lb_public_url_button}

deploy/basic/terraform/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ variable "generate_public_ssh_key" {
2828
default = true
2929
}
3030
variable "instance_shape" {
31-
default = "VM.Standard.E3.Flex"
31+
default = "VM.Standard.A1.Flex"
3232
}
3333
variable "instance_ocpus" {
3434
default = 1
3535
}
3636
variable "instance_shape_config_memory_in_gbs" {
37-
default = 16
37+
default = 6
3838
}
3939
variable "image_operating_system" {
4040
default = "Oracle Linux"

deploy/complete/helm-chart/mushop/charts/carts/templates/carts-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ spec:
4949
medium: Memory
5050
{{- include "carts.volumes" . | nindent 8 }}
5151
nodeSelector:
52-
beta.kubernetes.io/os: linux
52+
kubernetes.io/os: linux

deploy/complete/helm-chart/mushop/charts/orders/templates/orders-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ spec:
7171
medium: Memory
7272
{{- include "orders.volumes" . | nindent 8 }}
7373
nodeSelector:
74-
beta.kubernetes.io/os: linux
74+
kubernetes.io/os: linux

0 commit comments

Comments
 (0)