Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-UPF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-UPF
Commits
5f7a5a16
Commit
5f7a5a16
authored
Nov 03, 2022
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(rhel): installing curl version that supports HTTP2
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
2f72eea2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
2 deletions
+22
-2
ci-scripts/docker/Dockerfile.upf-vpp.rhel7
ci-scripts/docker/Dockerfile.upf-vpp.rhel7
+5
-0
docker/Dockerfile.upf-vpp.rhel7
docker/Dockerfile.upf-vpp.rhel7
+5
-0
src/nrf_client.sh
src/nrf_client.sh
+12
-2
No files found.
ci-scripts/docker/Dockerfile.upf-vpp.rhel7
View file @
5f7a5a16
...
...
@@ -74,6 +74,11 @@ RUN yum repolist --disablerepo=* && \
http://repo.openfusion.net/centos7-x86_64/hyperscan-5.3.0-1.of.el7.x86_64.rpm && \
rpm -i *.rpm && \
rm *.rpm && \
# The CURL version installed is 7.29 and does not support HTTP2
wget --tries=4 --retry-connrefused --wait=8 \
https://github.com/moparisthebest/static-curl/releases/download/v7.85.0/curl-amd64 \
-O /usr/bin/curl && \
chmod +x /usr/bin/curl && \
yum remove -y wget && \
yum clean all -y && \
rm -rf /var/cache/yum /var/cache/dnf
...
...
docker/Dockerfile.upf-vpp.rhel7
View file @
5f7a5a16
...
...
@@ -110,6 +110,11 @@ RUN yum repolist --disablerepo=* && \
http://repo.openfusion.net/centos7-x86_64/hyperscan-5.3.0-1.of.el7.x86_64.rpm && \
rpm -i *.rpm && \
rm *.rpm && \
# The CURL version installed is 7.29 and does not support HTTP2
wget --tries=4 --retry-connrefused --wait=8 \
https://github.com/moparisthebest/static-curl/releases/download/v7.85.0/curl-amd64 \
-O /usr/bin/curl && \
chmod +x /usr/bin/curl && \
yum remove -y wget && \
yum clean all -y && \
rm -rf /var/cache/yum /var/cache/dnf
...
...
src/nrf_client.sh
View file @
5f7a5a16
...
...
@@ -29,22 +29,32 @@
#*/
#"""
UPF_PROFILE
=
$CONFIG_DIR
/upf_profile.json
if
[
!
-v
UUID
]
;
then
echo
"UUID is not defined"
UUID
=
`
grep
nfInstanceId
${
UPF_PROFILE
}
|
sed
-e
's@ "nfInstanceId": "@@'
-e
's@",@@'
`
else
echo
"UUID is exported:
${
UUID
}
"
fi
NRF_URL
=
$NRF_IP_ADDR
:
$NRF_PORT
/nnrf-nfm/v1/nf-instances/
$UUID
echo
"NRF_URL is
${
NRF_URL
}
"
##### Variables #####
DUMP_STATUS_CODE
=
$(
echo
'--write-out %{http_code} --silent --output /dev/null'
)
PATCH_DATA
=
$(
echo
'[{"op":"replace","path":"/nfStatus","value":"REGISTERED"}]'
)
CONTENT_TYPE
=
$(
echo
'Content-Type: application/json'
)
HTTP2
=
--http2-prior-knowledge
UPF_PROFILE
=
$CONFIG_DIR
/upf_profile.json
NF_HEARTBEAT_TIMER
=
10
NF_HEARTBEAT_START
=
5
##### NF Registration #####
echo
"Sending NF Registration Request (HTTP Version
$HTTP_VERSION
)"
if
[[
${
HTTP_VERSION
}
==
2
]]
;
then
echo
'curl command options are: ${HTTP2} ${DUMP_STATUS_CODE} -X PUT ${NRF_URL} -d @${UPF_PROFILE} -H "${CONTENT_TYPE}"'
response
=
$(
curl
$HTTP2
$DUMP_STATUS_CODE
-X
PUT
$NRF_URL
-d
@
$UPF_PROFILE
-H
"
$CONTENT_TYPE
"
)
else
echo
'curl command options are: ${DUMP_STATUS_CODE} -X PUT ${NRF_URL} -d @${UPF_PROFILE} -H "${CONTENT_TYPE}"'
response
=
$(
curl
$DUMP_STATUS_CODE
-X
PUT
$NRF_URL
-d
@
$UPF_PROFILE
-H
"
$CONTENT_TYPE
"
)
fi
...
...
@@ -66,6 +76,6 @@ if [[ ${response} == 201 || ${response} == 200 ]];then
sleep
$NF_HEARTBEAT_TIMER
done
else
echo
-e
"
\n
NF Registration Procedure Failed ........!!!!"
echo
-e
"
\n
NF Registration Procedure Failed
(response is
${
response
}
)
........!!!!"
fi
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