Skip to content

Commit 7145faf

Browse files
Merge branch 'main' into focus
2 parents cbf1ed1 + f861366 commit 7145faf

File tree

38 files changed

+281
-91
lines changed

38 files changed

+281
-91
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<!--
2+
Copyright (c) 2024 Oracle and/or its affiliates.
3+
4+
The Universal Permissive License (UPL), Version 1.0
5+
6+
Subject to the condition set forth below, permission is hereby granted to any
7+
person obtaining a copy of this software, associated documentation and/or data
8+
(collectively the "Software"), free of charge and under any and all copyright
9+
rights in the Software, and any and all patent rights owned or freely
10+
licensable by each licensor hereunder covering either (i) the unmodified
11+
Software as contributed to or provided by such licensor, or (ii) the Larger
12+
Works (as defined below), to deal in both
13+
14+
(a) the Software, and
15+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
16+
one is included with the Software (each a "Larger Work" to which the Software
17+
is contributed by such licensors),
18+
19+
without restriction, including without limitation the rights to copy, create
20+
derivative works of, display, perform, and distribute the Software and make,
21+
use, sell, offer for sale, import, export, have made, and have sold the
22+
Software and the Larger Work(s), and to sublicense the foregoing rights on
23+
either these or other terms.
24+
25+
This license is subject to the following condition:
26+
The above copyright notice and either this complete permission notice or at
27+
a minimum a reference to the UPL must be included in all copies or
28+
substantial portions of the Software.
29+
30+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
33+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
35+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
36+
SOFTWARE.
37+
-->
38+
39+
### Guide
40+
41+
Please see the <a href="https://medium.com/@mika.rinne/ci-cd-for-nodejs-on-oci-without-kubernetes-a6f94b4b2948">setup guide on Medium</a>.
42+
43+
### License
44+
45+
Copyright (c) 2024 Oracle and/or its affiliates.
46+
47+
Licensed under the Universal Permissive License (UPL), Version 1.0.
48+
49+
See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/LICENSE) for more details.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: 0.1
2+
component: build
3+
timeoutInSeconds: 180
4+
shell: bash
5+
failImmediatelyOnError: true
6+
env:
7+
exportedVariables:
8+
- buildId
9+
steps:
10+
- type: Command
11+
name: "create build-id for the artifact"
12+
command: |
13+
buildId=`echo ${OCI_BUILD_RUN_ID} | rev | cut -c 1-6 | rev`
14+
echo "Build ID: $buildId"
15+
- type: Command
16+
name: "build and run NodeJS app, create zip artifact if runs ok"
17+
command: |
18+
cd source
19+
npm install
20+
npm start &
21+
sleep 2
22+
res=$(curl -s localhost:5000)
23+
echo ">>>> $res"
24+
cd ..
25+
zip -q -r nodejs.zip source
26+
outputArtifacts:
27+
- name: nodejs
28+
type: BINARY
29+
location: ./nodejs.zip
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
version: 1.0
2+
component: deployment
3+
runAs: ocarun
4+
env:
5+
variables:
6+
version: ${buildId}
7+
files:
8+
- source: /nodejs.zip
9+
destination: /tmp
10+
steps:
11+
- stepType: Command
12+
name: kill NodeJS
13+
command: "pkill -f 'node /home/opc/source/server.js'"
14+
timeoutInSeconds: 60
15+
runAs: root
16+
- stepType: Command
17+
name: copy NodeJS
18+
command: "cp /tmp/nodejs.zip /home/opc/nodejs.zip"
19+
timeoutInSeconds: 60
20+
runAs: root
21+
- stepType: Command
22+
name: cd to home
23+
command: "cd /home/opc"
24+
timeoutInSeconds: 60
25+
runAs: root
26+
- stepType: Command
27+
name: unzip
28+
command: "unzip -o nodejs.zip -d /home/opc"
29+
timeoutInSeconds: 60
30+
runAs: root
31+
- stepType: Command
32+
name: start NodeJS
33+
command: "nohup node /home/opc/source/server.js &"
34+
timeoutInSeconds: 60
35+
runAs: root
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "node",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "server.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"start": "node server.js"
9+
},
10+
"author": "",
11+
"license": "ISC",
12+
"dependencies": {
13+
"express": "^4.18.2"
14+
}
15+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
Copyright (c) 2024 Oracle and/or its affiliates.
3+
4+
The Universal Permissive License (UPL), Version 1.0
5+
6+
Subject to the condition set forth below, permission is hereby granted to any
7+
person obtaining a copy of this software, associated documentation and/or data
8+
(collectively the "Software"), free of charge and under any and all copyright
9+
rights in the Software, and any and all patent rights owned or freely
10+
licensable by each licensor hereunder covering either (i) the unmodified
11+
Software as contributed to or provided by such licensor, or (ii) the Larger
12+
Works (as defined below), to deal in both
13+
14+
(a) the Software, and
15+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
16+
one is included with the Software (each a "Larger Work" to which the Software
17+
is contributed by such licensors),
18+
19+
without restriction, including without limitation the rights to copy, create
20+
derivative works of, display, perform, and distribute the Software and make,
21+
use, sell, offer for sale, import, export, have made, and have sold the
22+
Software and the Larger Work(s), and to sublicense the foregoing rights on
23+
either these or other terms.
24+
25+
This license is subject to the following condition:
26+
The above copyright notice and either this complete permission notice or at
27+
a minimum a reference to the UPL must be included in all copies or
28+
substantial portions of the Software.
29+
30+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
33+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
35+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
36+
SOFTWARE.
37+
*/
38+
39+
const express = require('express')
40+
const app = express()
41+
const port = 5000
42+
43+
app.get('/', (req, res) => {
44+
res.send('Hello from NodeJS on OCI <3')
45+
})
46+
47+
app.listen(port, () => {
48+
console.log(`Listening on port ${port}`)
49+
})

cloud-infrastructure/networking/README.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Cloud Networking
22

33
Oracle Cloud Infrastructure (OCI) networking and connectivity products and services enable customers to manage and scale their networks. Customers can connect securely to a customizable, isolated virtual cloud network (VCN), and take advantage of inexpensive data egress charges. Granular access control of networking technologies provides connectivity solutions across both physical and virtual networks.
4-
4+
5+
Reviewed: 19.02.2024
56

67
# Table of Contents
78

@@ -14,20 +15,6 @@ Oracle Cloud Infrastructure (OCI) networking and connectivity products and servi
1415
- [OCI Networking](https://www.oracle.com/cloud/networking/)
1516
- [Network Command Center Services](https://docs.oracle.com/en-us/iaas/Content/Network/Concepts/net_command_center.htm)
1617

17-
18-
## Team Publications
19-
20-
### Reference Architectures & Step-by-step Guides
21-
22-
23-
### Blogs
24-
25-
26-
27-
### Videos & Podcasts
28-
29-
30-
3118
# License
3219

3320
Copyright (c) 2024 Oracle and/or its affiliates.

cloud-infrastructure/networking/business-continuity-and-disaster-recovery/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ These assets help you understand various HA and DR cloud architectures.
55
Reviewed: 06.02.2024
66

77
# Useful Links
8+
89
- [OCI Disaster Recovery Overview](https://docs.oracle.com/en-us/iaas/Content/cloud-adoption-framework/disaster-recovery.htm)
910
- [Learning](https://learn.oracle.com/ols/event/business-continuity-disaster-recovery-on-the-cloud/89350/116373/181290)
1011

11-
## Reference Architectures & Step-by-step Guides
12-
1312
## Blogs
1413

1514
- [Two-region strategy resilient solution](https://blogs.oracle.com/cloud-infrastructure/post/ocis-tworegion-strategy-resilient-solution)

cloud-infrastructure/networking/business-continuity-and-disaster-recovery/ha-dr-patterns/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# HA DR Patterns
22

33
Use this asset to understand various HA and DR Patterns
4+
5+
Reviewed: 19.02.2024
46

5-
## When to use this asset?
7+
# When to use this asset?
68

79
*Before selecting the appropriate HA/DR network design*
810

9-
## How to use this asset?
11+
# How to use this asset?
1012

1113
*Use it as a reference architecture for varuous HA/DR network designs*
1214

cloud-infrastructure/networking/business-continuity-and-disaster-recovery/multi-tenancy-dr-arch-mpls-fw/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Multi tenancy DR Architecture with MPLS
22

33
This is a reference architecture
4+
5+
Reviewed: 19.02.2024
46

5-
## When to use this asset?
7+
# When to use this asset?
68

79
*Before architecting DR design for Multi tenancy MPLS connections*
810

9-
## How to use this asset?
11+
# How to use this asset?
1012

1113
*Use this as a reference architecture for configuring Multi tenancy DR design with MPLS connections and a firewall ( Fortigate)*
1214

cloud-infrastructure/networking/cdn/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Enables customers to deliver digital content to end users from a nearby location
55
Reviewed: 06.02.2024
66

77
# Useful Links
8+
89
- [Oracle CDN Announcement](https://www.oracle.com/uk/news/announcement/oracle-launches-new-flexible-cloud-infrastructure-services-2022-03-15/)
910

1011
# License

0 commit comments

Comments
 (0)