Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
vnf-onboarding
OSM Packages
Commits
00cce646
Commit
00cce646
authored
Oct 17, 2022
by
ppree
Committed by
Mark Beierl
Oct 17, 2022
Browse files
VNF Onboarding session packages
parent
2616e0e0
Changes
44
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
164 additions
and
0 deletions
+164
-0
Hackfest_Demos/OSM-MR13/1.2-VNF/wiki_webserver_autoscale_vnfd/cloud_init/.DS_Store
....2-VNF/wiki_webserver_autoscale_vnfd/cloud_init/.DS_Store
+0
-0
Hackfest_Demos/OSM-MR13/1.2-VNF/wiki_webserver_autoscale_vnfd/cloud_init/cloud_init_apache
...iki_webserver_autoscale_vnfd/cloud_init/cloud_init_apache
+10
-0
Hackfest_Demos/OSM-MR13/1.2-VNF/wiki_webserver_autoscale_vnfd/cloud_init/cloud_init_haproxy
...ki_webserver_autoscale_vnfd/cloud_init/cloud_init_haproxy
+17
-0
Hackfest_Demos/OSM-MR13/1.2-VNF/wiki_webserver_autoscale_vnfd/wiki_webserver_autoscale_vnfd.yaml
...bserver_autoscale_vnfd/wiki_webserver_autoscale_vnfd.yaml
+137
-0
No files found.
Hackfest_Demos/OSM-MR13/1.2-VNF/wiki_webserver_autoscale_vnfd/cloud_init/.DS_Store
0 → 100644
View file @
00cce646
File added
Hackfest_Demos/OSM-MR13/1.2-VNF/wiki_webserver_autoscale_vnfd/cloud_init/cloud_init_apache
0 → 100644
View file @
00cce646
#cloud-config
hostname: apachevdu
password: osm2021
chpasswd: { expire: False }
ssh_pwauth: True
runcmd:
- ip=$(ifconfig | grep -A 1 "ens3" | tail -1 | cut -d ":" -f 2 | cut -d " " -f 1)
- sudo -S sed -i "/Active web server VDUs in this VNF/d" /var/www/html/index.php
- sudo -S sed -i "/OSM!/a\ echo \'<p> Data Serving From ${ip} <\/p>\';" /var/www/html/index.php
Hackfest_Demos/OSM-MR13/1.2-VNF/wiki_webserver_autoscale_vnfd/cloud_init/cloud_init_haproxy
0 → 100644
View file @
00cce646
#cloud-config
hostname: haproxyvdu
password: osm2021
chpasswd: { expire: False }
ssh_pwauth: True
runcmd:
- ip=$(ifconfig | grep -A 1 "ens4" | tail -1 | cut -d ":" -f 2 | cut -d " " -f 1)
- sudo -S sed -i "s/ipv4@\(.*:9999\)/ipv4@${ip}\:9999/" /etc/haproxy/haproxy.cfg
- sudo -S sed -i "/option forwardfor/d" /etc/haproxy/haproxy.cfg
- sudo -S sed -i "/http\-request set\-header X\-Forwarded-Port \%\[dst\_port\]/d" /etc/haproxy/haproxy.cfg
- sudo -S sed -i "/http\-request add\-header X\-Forwarded-Proto https if { ssl_fc }/d" /etc/haproxy/haproxy.cfg
- sudo -S sed -i "/option httpchk HEAD/d" /etc/haproxy/haproxy.cfg
- sudo -S sed -i "/roundrobin/a\ server node0 192.168.28.2:8080 check" /etc/haproxy/haproxy.cfg
- sleep 60
- echo "osm2021" | sudo service haproxy restart
Hackfest_Demos/OSM-MR13/1.2-VNF/wiki_webserver_autoscale_vnfd/wiki_webserver_autoscale_vnfd.yaml
0 → 100644
View file @
00cce646
vnfd
:
description
:
Scaling wiki web server with load balancer and metrics
df
:
-
id
:
default-df
instantiation-level
:
-
id
:
default-instantiation-level
vdu-level
:
-
number-of-instances
:
1
vdu-id
:
haproxy_vdu
-
number-of-instances
:
2
vdu-id
:
apache_vdu
vdu-profile
:
-
id
:
haproxy_vdu
min-number-of-instances
:
1
-
id
:
apache_vdu
max-number-of-instances
:
11
min-number-of-instances
:
2
virtual-link-profile
:
-
flavour
:
id
:
internal_services
virtual-link-protocol-data
:
l3-protocol-data
:
cidr
:
192.168.28.0/28
description
:
Services Subnet
dhcp-enabled
:
true
gateway-ip
:
192.168.28.14
ip-version
:
ipv4
name
:
internal_services-l3-protocol-data
healing-aspect
:
-
id
:
apache-VM_autoheal
healing-policy
:
-
vdu-id
:
apache_vdu
event-name
:
heal-alarm
recovery-type
:
automatic
action-on-recovery
:
REDEPLOY_ONLY
cooldown-time
:
180
day1
:
false
ext-cpd
:
-
id
:
haproxy_public-ext
int-cpd
:
cpd
:
haproxy_vdu_eth1-int
vdu-id
:
haproxy_vdu
id
:
wiki_webserver_autoscale_vnf
int-virtual-link-desc
:
-
id
:
internal_services
mgmt-cp
:
haproxy_public-ext
product-name
:
wiki_webserver_autoscale_vnf
provider
:
Altran
sw-image-desc
:
-
id
:
haproxy_ubuntu
image
:
haproxy_ubuntu
name
:
haproxy_ubuntu
-
id
:
apache_ubuntu
image
:
apache_ubuntu
name
:
apache_ubuntu
vdu
:
-
cloud-init-file
:
cloud_init_haproxy
description
:
haproxy_vdu
id
:
haproxy_vdu
int-cpd
:
-
id
:
haproxy_vdu_eth1-int
virtual-network-interface-requirement
:
-
name
:
haproxy_vdu_eth0
position
:
1
virtual-interface
:
type
:
VIRTIO
-
id
:
haproxy_vdu_eth2-int
int-virtual-link-desc
:
internal_services
virtual-network-interface-requirement
:
-
name
:
haproxy_vdu_eth2
position
:
2
virtual-interface
:
type
:
VIRTIO
name
:
haproxy_vdu
sw-image-desc
:
haproxy_ubuntu
virtual-compute-desc
:
haproxy_vdu-compute
virtual-storage-desc
:
-
haproxy_vdu-storage
-
alarm
:
-
actions
:
alarm
:
-
url
:
https://webhook.site/2b627634-6e75-4c9a-8b81-810b113f73b6
insufficient-data
:
-
url
:
https://webhook.site/ee011b3e-bb1a-43bd-87d0-5da401212121
ok
:
-
url
:
https://webhook.site/2b627634-6e75-4c9a-8b81-810b113f73b6
alarm-id
:
alarm-1
operation
:
GT
value
:
60
vnf-monitoring-param-ref
:
apache_vnf_cpu_util
cloud-init-file
:
cloud_init_apache
description
:
apache_vdu
id
:
apache_vdu
int-cpd
:
-
id
:
apache_vdu_eth1-int
int-virtual-link-desc
:
internal_services
virtual-network-interface-requirement
:
-
name
:
apache_vdu_eth1
position
:
1
virtual-interface
:
type
:
VIRTIO
monitoring-parameter
:
-
id
:
apache_vnf_cpu_util
name
:
apache_vnf_cpu_util
performance-metric
:
cpu_utilization
-
id
:
apache_vnf_memory_util
name
:
apache_vnf_memory_util
performance-metric
:
average_memory_utilization
-
id
:
apache_vnf_packets_sent
name
:
apache_vnf_packets_sent
performance-metric
:
packets_sent
-
id
:
apache_vnf_packets_received
name
:
apache_vnf_packets_received
performance-metric
:
packets_received
name
:
apache_vdu
sw-image-desc
:
apache_ubuntu
virtual-compute-desc
:
apache_vdu-compute
virtual-storage-desc
:
-
apache_vdu-storage
version
:
3.1
virtual-compute-desc
:
-
id
:
haproxy_vdu-compute
virtual-cpu
:
num-virtual-cpu
:
4
virtual-memory
:
size
:
4.0
-
id
:
apache_vdu-compute
virtual-cpu
:
num-virtual-cpu
:
1
virtual-memory
:
size
:
1.0
virtual-storage-desc
:
-
id
:
haproxy_vdu-storage
size-of-storage
:
10
-
id
:
apache_vdu-storage
size-of-storage
:
10
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment