forked from google-cloud-abap/abap-cloud-trial-2022-gcp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvm_startup_script.sh
More file actions
55 lines (45 loc) · 1.51 KB
/
vm_startup_script.sh
File metadata and controls
55 lines (45 loc) · 1.51 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
#!/bin/bash
# VM startup script
# curl https://raw.githubusercontent.com/busetde/abap-cloud-trial-2023-gcp/vm_startup_script.sh -o /tmp/vm_startup_script.sh
# chmod 755 /tmp/vm_startup_script.sh
# nohup /tmp/vm_startup_script.sh > /tmp/output.txt &
# Update the package list
sudo apt-get update -y
# Install required packages
sudo apt-get install -y \
ca-certificates \
curl \
gnupg \
lsb-release \
zip \
unzip
# Add Docker's official GPG key
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
# Set up the stable repository
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# Update the package list again
sudo apt-get update -y
# Install Docker Engine
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
# Start and enable Docker service
sudo systemctl start docker
sudo systemctl enable docker
#Download image and install SAP 2023 Trial
# Pull the docker image
sudo docker pull sapse/abap-cloud-developer-trial:2023
# Start the docker container
sudo docker run \
--stop-timeout 3600 \
--name a4h \
-h vhcala4hci \
-p 3200:3200 \
-p 3300:3300 \
-p 8443:8443 \
-p 30213:30213 \
-p 50000:50000 \
-p 50001:50001 \
sapse/abap-cloud-developer-trial:2023 \
-skip-limits-check \
--agree-to-sap-license