-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcloud-init-script
More file actions
41 lines (32 loc) · 1.24 KB
/
Copy pathcloud-init-script
File metadata and controls
41 lines (32 loc) · 1.24 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
Content-Type: multipart/mixed; boundary="//"
MIME-Version: 1.0
--//
Content-Type: text/cloud-config; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="cloud-config.txt"
#cloud-config
cloud_final_modules:
- [scripts-user, always]
--//
Content-Type: text/x-shellscript; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="userdata.txt"
#!/bin/bash
systemctl start docker
modprobe uio
modprobe uio_pci_generic
cd dpdk-kmods/linux/igb_uio
insmod igb_uio.ko
cd ~
docker run --rm --privileged --network=host \
-v /lib/modules:/lib/modules \
getcapsule/dpdk-devbind:19.11.6 \
/bin/bash -c 'dpdk-devbind.py --force -b igb_uio 0000:00:06.0'
docker stop $(docker ps -aq)
docker rm $(docker ps -aq)
docker run -d -it --privileged --network=host --name sandbox --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v /lib/modules:/lib/modules -v /dev/hugepages:/dev/hugepages -v /home/ec2-user/gdp:/gdp -v/usr/local/cargo/registry:/usr/local/cargo/registry getcapsule/sandbox:19.11.6-1.50 tail -f /dev/null
echo 'docker exec -it sandbox /bin/bash' > /usr/bin/rungdp
chmod +x /usr/bin/rungdp
--//--