-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathprovision_test-app-nodejs.yml
More file actions
69 lines (61 loc) · 2.84 KB
/
Copy pathprovision_test-app-nodejs.yml
File metadata and controls
69 lines (61 loc) · 2.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
lang_variant:
name: nodejs
version: default
cache: true
install:
- os_type: linux
os_distro: deb
remote-command: |
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
- os_type: linux
os_distro: rpm
os_branch: redhat
remote-command: |
sudo yum install tar -y || sudo dnf install tar -y || true
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install --no-progress 22.11.0
nvm use 22.11.0
n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; sudo cp -r $n/{bin,lib,share} /usr/local
- os_type: linux
os_distro: rpm
os_branch: centos_8_amd64
remote-command: |
sudo yum install tar -y || sudo dnf install tar -y || true
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install --no-progress 22.11.0
nvm use 22.11.0
n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; sudo cp -r $n/{bin,lib,share} /usr/local
- os_type: linux
os_distro: rpm
remote-command: |
#Default installation for amazon linux 2022 and 2023
#https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-up-node-on-ec2-instance.html
sudo yum install tar -y || sudo dnf install tar -y || true
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm install --no-progress 22.11.0
nvm use 22.11.0
n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; sudo cp -r $n/{bin,lib,share} /usr/local
weblog:
name: test-app-nodejs
install:
- os_type: linux
copy_files:
- name: copy-service
local_path: utils/build/virtual_machine/weblogs/common/test-app.service
- name: copy-service-run-script
local_path: utils/build/virtual_machine/weblogs/common/create_and_run_app_service.sh
- name: copy-run-weblog-script
local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs/test-app-nodejs_run.sh
- name: copy-binary
local_path: lib-injection/build/docker/nodejs/sample-app/index.js
remote-command: sh test-app-nodejs_run.sh