Skip to content

Commit

Permalink
Merge pull request #83 from KourokiTakuto/master
Browse files Browse the repository at this point in the history
Support percell fqdn
  • Loading branch information
hiroaki-shibata authored Mar 14, 2019
2 parents 0f18bdc + 18f7a2c commit 73cda50
Show file tree
Hide file tree
Showing 17 changed files with 335 additions and 237 deletions.
7 changes: 7 additions & 0 deletions 1-server_unit/Ansible_Settings_Instruction.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@ Below are the files where modification is required.
{Personium_FQDN}
# -> Specify the FQDN for Personium server(same as unit FQDN)
# EX: {Personium_FQDN}->ec2-54-65-33-203.ap-northeast-1.compute.amazonaws.com

{Path_Based_Cell_Url_Enabled}
# -> URL format to access cell*1
# -> true:path based cell url
# -> false:per cell fqdn url
# EX: {Path_Based_Cell_Url_Enabled}->false
```
*1.For explanation about URL format to access cell, please confirm [here](https://personium.io/docs/ja/server-operator/setup_percell.html).

#### Bastion server

Expand Down
24 changes: 14 additions & 10 deletions 1-server_unit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Common Name value should be the unit domain name.
```console
# cd /root/ansible/resource/web/opt/nginx/conf
# openssl genrsa -des3 -out server.key 1024
Enter pass phrase for server.key: \* Optional (Characters length: is 4 - 8191)
Enter pass phrase for server.key: \* Required (Characters length: is 4 - 8191)
# openssl req -new -key server.key -out server.csr
Enter pass phrase for server.key: \* enter the value of `server.key`
Country Name (2 letter code) [XX]: \* Optional ( entered value will be visible in the certificate)
Expand All @@ -118,10 +118,10 @@ Common Name value should be the unit domain name.
Common Name (eg, your name or your server's hostname) []: \* Required ( entered value will be visible in the certificate)
Email Address []: \* Optional ( entered value will be visible in the certificate)

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

# cp server.key server.key.org
# openssl rsa -in server.key.org -out server.key
Expand Down Expand Up @@ -162,8 +162,8 @@ Common Name value should be the unit domain name.
Enter file in which to save the key (/root/.ssh/id_rsa): (\* press enter to save the rsa key pair at /root/.ssh/id_rsa, otherwise specify the alternative path)
Enter passphrase (empty for no passphrase): (\* press enter to save the key without password)
Enter same passphrase again: (\* press enter if no password added on passphrase)
Your identification has been saved in /root/.ssh/id_rsa. (\* press enter)
Your public key has been saved in /root/.ssh/id_rsa.pub. (\* press enter)
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
```

The `public key` will be placed in `/root/.ssh/id_rsa.pub`
Expand Down Expand Up @@ -227,7 +227,11 @@ The `private key` (identification) will be placed in `/root/.ssh/id_rsa`
# chmod 600 /root/.ssh/authorized_keys
# ls -la /root/.ssh/authorized_keys
-rw-------. 1 root root 952 Aug 27 02:41 /root/.ssh/authorized_keys
```

* Check the permission. Change if necessary

```console
# ls -la /root/
drwx------. 2 root root 4096 Aug 27 02:41 .ssh
```
Expand All @@ -236,7 +240,7 @@ The `private key` (identification) will be placed in `/root/.ssh/id_rsa`

```console
# chmod 700 /root/.ssh
# ls -la /root/.ssh
# ls -la /root/
drwx------. 2 root root 4096 Aug 27 02:41 .ssh
# exit
```
Expand Down Expand Up @@ -325,8 +329,8 @@ The `private key` (identification) will be placed in `/root/.ssh/id_rsa`
* Execute the reachability testing tool

```
# /bin/sh personium_regression.sh https://{{ FQDN of Web server }}
[PCS Version(default) RT OK]
# /bin/sh personium_regression.sh {{ FQDN of Web server }}
[personium Version(default) RT OK]
```

\* reachability testing is done, if it shows the same
Expand Down
66 changes: 39 additions & 27 deletions 1-server_unit/personium_regression.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,36 @@
#
# Shell script for checking communication
# - argument
# $1: Unit URL
# $2: Unit Master Token
# $1: Unit FQDN
#
#



if [ $# -ne 1 ]; then
echo "Usage: personium_regression.sh {url_domain}"
echo "Usage: personium_regression.sh {FQDN}"
echo "This argument is necessary."
exit 1
fi


FQDN=${1}
CELL_NAME=startuptest
URL_DOMAIN=https://${FQDN}
PATH_BASED_CELL_URL=`grep "pathBasedCellUrl" /personium/personium-core/conf/18888/personium-unit-config.properties | sed -e "s/io.personium.core.pathBasedCellUrl.enabled=//"`

if [ "false" == "${PATH_BASED_CELL_URL}" ]; then
grep ${CELL_NAME}.${FQDN} /etc/hosts > /dev/null

if [ $? -eq 1 ]; then
echo "127.0.0.1" ${CELL_NAME}.${FQDN} >> /etc/hosts
fi

URL_DOMAIN=${1}
CELL_URL=https://${CELL_NAME}.${FQDN}
else
CELL_URL=https://${FQDN}/${CELL_NAME}
fi

SPECIFIED_ACCESS_TOKEN=`grep "master_token" ~/ansible/static_inventory/hosts | sed -e "s/master_token=//" | uniq`
SPECIFIED_ACCESS_TOKEN=`grep "core.masterToken" /personium/personium-core/conf/18888/personium-unit-config.properties | sed -e "s/io.personium.core.masterToken=//"`

XDCVERSION=default
CURL_LOG=/tmp/rt_curl_${XDCVERSION}.txt
Expand Down Expand Up @@ -62,47 +74,47 @@ fi
echo ${ACCESSTOKEN} >> ${RT_LOG}

echo "Delete rule" >> ${RT_LOG}
curl -X DELETE -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/startuptest/__ctl/Rule(Name='testRule')" -H "Accept: application/json" -H "Authorization: Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
curl -X DELETE -w "\nstatus:%{http_code}\n" "${CELL_URL}/__ctl/Rule(Name='testRule')" -H "Accept: application/json" -H "Authorization: Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}

echo "Delete Service Source" >> ${RT_LOG}
curl -X DELETE -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/startuptest/box/col/__src/test.js" -H "Accept:application/json" -H "Content-Type: text/javascript" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
curl -X DELETE -w "\nstatus:%{http_code}\n" "${CELL_URL}/col/__src/test.js" -H "Accept:application/json" -H "Content-Type: text/javascript" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}

echo "Delete Collection" >> ${RT_LOG}
curl -X DELETE -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/startuptest/box/col" -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
curl -X DELETE -w "\nstatus:%{http_code}\n" "${CELL_URL}/box/col" -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}

echo "Delete Box" >> ${RT_LOG}
curl -X DELETE -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/startuptest/__ctl/Box('box')" -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -H "If-Match: *" -i -k -s > ${CURL_LOG}
curl -X DELETE -w "\nstatus:%{http_code}\n" "${CELL_URL}/__ctl/Box('box')" -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -H "If-Match: *" -i -k -s > ${CURL_LOG}

echo "Delete Cell" >> ${RT_LOG}
curl -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/__ctl/Cell(Name='startuptest')" -X DELETE -H "Accept:application/json" -H "If-Match: *" -H "Authorization:Bearer $ACCESSTOKEN" -k -i -s > ${CURL_LOG}
curl -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/__ctl/Cell(Name=%27${CELL_NAME}%27)" -X DELETE -H "Accept:application/json" -H "If-Match: *" -H "Authorization:Bearer $ACCESSTOKEN" -k -i -s > ${CURL_LOG}

echo "Ceate Cell" >> ${RT_LOG}
curl -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/__ctl/Cell" -X POST -d "{\"Name\":\"startuptest\"}" $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -k -i -s > ${CURL_LOG}
curl -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/__ctl/Cell" -X POST -d "{\"Name\":\"${CELL_NAME}\"}" $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -k -i -s > ${CURL_LOG}
check_response 201 "Ceate Cell"


echo "Get Cell" >> ${RT_LOG}
curl -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/__ctl/Cell(Name='startuptest')" -X GET $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -k -i -s > ${CURL_LOG}
curl -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/__ctl/Cell(Name=%27${CELL_NAME}%27)" -X GET $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -k -i -s > ${CURL_LOG}
check_response 200 "Get Cell"


echo "Create Box" >> ${RT_LOG}
curl -X POST -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/startuptest/__ctl/Box" -d "{\"Name\":\"box\"}" $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
curl -X POST -w "\nstatus:%{http_code}\n" "${CELL_URL}/__ctl/Box" -d "{\"Name\":\"box\"}" $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
check_response 201 "Create Box"


echo "Create Service Collection" >> ${RT_LOG}
curl -X MKCOL -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/startuptest/box/col" -d "<?xml version=\"1.0\" encoding=\"utf-8\"?><D:mkcol xmlns:D=\"DAV:\" xmlns:p=\"urn:x-personium:xmlns\"><D:set><D:prop><D:resourcetype><D:collection/><p:service/></D:resourcetype></D:prop></D:set></D:mkcol>" $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
curl -X MKCOL -w "\nstatus:%{http_code}\n" "${CELL_URL}/box/col" -d "<?xml version=\"1.0\" encoding=\"utf-8\"?><D:mkcol xmlns:D=\"DAV:\" xmlns:p=\"urn:x-personium:xmlns\"><D:set><D:prop><D:resourcetype><D:collection/><p:service/></D:resourcetype></D:prop></D:set></D:mkcol>" $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
check_response 201 "Create Service Collection"


echo "Register Service Source" >> ${RT_LOG}
curl -X PUT -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/startuptest/box/col/__src/test.js" -d "function(request){return {status: 200,headers: {\"Content-Type\":\"text/html\"},body: [\"hello world\"]};}" $XDCVERSION_HEADER -H "Accept:application/json" -H "Content-Type: text/javascript" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
curl -X PUT -w "\nstatus:%{http_code}\n" "${CELL_URL}/box/col/__src/test.js" -d "function(request){return {status: 200,headers: {\"Content-Type\":\"text/html\"},body: [\"hello world\"]};}" $XDCVERSION_HEADER -H "Accept:application/json" -H "Content-Type: text/javascript" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
check_response 201 "Register Service Source"


echo "Register Service" >> ${RT_LOG}
curl -X PROPPATCH -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/startuptest/box/col" -d "<?xml version=\"1.0\" encoding=\"utf-8\" ?><D:propertyupdate xmlns:D=\"DAV:\" xmlns:p=\"urn:x-personium:xmlns\" xmlns:Z=\"http:/www.w3.com/standards/z39.50/\"><D:set><D:prop><p:service language=\"JavaScript\"><p:path name=\"test\" src=\"test.js\"/></p:service></D:prop></D:set></D:propertyupdate>" $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
curl -X PROPPATCH -w "\nstatus:%{http_code}\n" "${CELL_URL}/box/col" -d "<?xml version=\"1.0\" encoding=\"utf-8\" ?><D:propertyupdate xmlns:D=\"DAV:\" xmlns:p=\"urn:x-personium:xmlns\" xmlns:Z=\"http:/www.w3.com/standards/z39.50/\"><D:set><D:prop><p:service language=\"JavaScript\"><p:path name=\"test\" src=\"test.js\"/></p:service></D:prop></D:set></D:propertyupdate>" $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
check_response 207 "Register service"
if [ "`/bin/grep '<status>' ${CURL_LOG} | awk '{print $2}'`" != "200" ];then
echo "Register Service faild."
Expand All @@ -112,7 +124,7 @@ fi
echo "Service execution" >> ${RT_LOG}
for i in `seq 1 4`
do
curl -X GET -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/startuptest/box/col/test" $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
curl -X GET -w "\nstatus:%{http_code}\n" "${CELL_URL}/box/col/test" $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
check_response 200 "Service execution"
if [ "`/bin/grep 'hello world' ${CURL_LOG}`" != "hello world" ];then
echo "Ran another script."
Expand All @@ -122,47 +134,47 @@ done


echo "Register rule" >> ${RT_LOG}
curl -X POST -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/startuptest/__ctl/Rule" -d "{\"Name\":\"testRule\", \"EventType\":\"test\", \"EventExternal\":true, \"Action\":\"log\"}" -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
curl -X POST -w "\nstatus:%{http_code}\n" "${CELL_URL}/__ctl/Rule" -d "{\"Name\":\"testRule\", \"EventType\":\"test\", \"EventExternal\":true, \"Action\":\"log\"}" -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
check_response 201 "Register rule"


echo "Event receptionist" >> ${RT_LOG}
curl -X POST -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/startuptest/__event" -d "{\"Type\":\"action_value\",\"Object\":\"object_value\",\"Info\":\"result_value\"}" $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
curl -X POST -w "\nstatus:%{http_code}\n" "${CELL_URL}/__event" -d "{\"Type\":\"action_value\",\"Object\":\"object_value\",\"Info\":\"result_value\"}" $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
check_response 200 "Event receptionist"


echo "Get Logfile" >> ${RT_LOG}
curl -X GET -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/startuptest/__log/current/default.log" $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
curl -X GET -w "\nstatus:%{http_code}\n" "${CELL_URL}/__log/current/default.log" $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
check_response 200 "Get Logfile"


echo "Delete rule" >> ${RT_LOG}
curl -X DELETE -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/startuptest/__ctl/Rule(Name='testRule')" -H "Accept: application/json" -H "Authorization: Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
curl -X DELETE -w "\nstatus:%{http_code}\n" "${CELL_URL}/__ctl/Rule(Name='testRule')" -H "Accept: application/json" -H "Authorization: Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
check_response 204 "Delete rule"


echo "Delete Service Source" >> ${RT_LOG}
curl -X DELETE -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/startuptest/box/col/__src/test.js" $XDCVERSION_HEADER -H "Accept:application/json" -H "Content-Type: text/javascript" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
curl -X DELETE -w "\nstatus:%{http_code}\n" "${CELL_URL}/box/col/__src/test.js" $XDCVERSION_HEADER -H "Accept:application/json" -H "Content-Type: text/javascript" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
check_response 204 "Delete Service Source"


echo "Delete Collection" >> ${RT_LOG}
curl -X DELETE -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/startuptest/box/col" $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
curl -X DELETE -w "\nstatus:%{http_code}\n" "${CELL_URL}/box/col" $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -i -k -s > ${CURL_LOG}
check_response 204 "Delete Collection"


echo "Delete Box" >> ${RT_LOG}
curl -X DELETE -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/startuptest/__ctl/Box('box')" $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -H "If-Match: *" -i -k -s > ${CURL_LOG}
curl -X DELETE -w "\nstatus:%{http_code}\n" "${CELL_URL}/__ctl/Box('box')" $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -H "If-Match: *" -i -k -s > ${CURL_LOG}
check_response 204 "Delete Box"


echo "Delete Cell" >> ${RT_LOG}
curl -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/__ctl/Cell(Name='startuptest')" -X DELETE $XDCVERSION_HEADER -H "Accept:application/json" -H "If-Match: *" -H "Authorization:Bearer $ACCESSTOKEN" -k -i -s > ${CURL_LOG}
curl -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/__ctl/Cell(Name=%27${CELL_NAME}%27)" -X DELETE $XDCVERSION_HEADER -H "Accept:application/json" -H "If-Match: *" -H "Authorization:Bearer $ACCESSTOKEN" -k -i -s > ${CURL_LOG}
check_response 204 "Delete Cell"


echo "Check Delete Cell" >> ${RT_LOG}
curl -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/__ctl/Cell(Name='startuptest')" -X GET $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -k -i -s > ${CURL_LOG}
curl -w "\nstatus:%{http_code}\n" "${URL_DOMAIN}/__ctl/Cell(Name=%27${CELL_NAME}%27)" -X GET $XDCVERSION_HEADER -H "Accept:application/json" -H "Authorization:Bearer $ACCESSTOKEN" -k -i -s > ${CURL_LOG}
check_response 404 "Check Delete Cell"


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ io.personium.core.plugin.path=/personium/personium-core/plugins
# URL format to access cell
# true:path based cell url
# false:per cell fqdn url
io.personium.core.pathBasedCellUrl.enabled=true
io.personium.core.pathBasedCellUrl.enabled={{ path_based_cell_url_enabled }}

###### X509 ######
# File path to the X509 root certificate file.
Expand Down
21 changes: 16 additions & 5 deletions 1-server_unit/resource/bastion/tmp/personium-init-svcmgr.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,30 @@
# Initial setup script of Unitadmin cell

# Environmental setting
DOMAIN=https://{{ base_url }}
DOMAIN={{ base_url }}
MASTER_TOKEN={{ master_token }}
CELL_NAME=unitadmin
ROLE_UA_NAME=UnitAdmin
ROLE_CCA_NAME=CellContentsAdmin
CELL_OWNER=personium-localunit:/$CELL_NAME/#unitadmin
UNITADMIN_ACCOUNT_FILE=/root/ansible/unitadmin_account
PATH_BASED_CELL_URL={{ path_based_cell_url_enabled }}

if [ "false" == "${PATH_BASED_CELL_URL}" ]; then
grep ${CELL_NAME}.${DOMAIN} /etc/hosts > /dev/null

if [ $? -eq 1 ]; then
echo "127.0.0.1" ${CELL_NAME}.${DOMAIN} >> /etc/hosts
fi

CELL_URL=https://${CELL_NAME}.${DOMAIN}
else
CELL_URL=https://${DOMAIN}/${CELL_NAME}
fi

# Account and password to create
UU_NAME=(unitadmin)
UU_PASS=()
CELL_URL=$DOMAIN/$CELL_NAME


function check_response() {
STATUS=${1}
Expand All @@ -45,11 +56,11 @@ function check_response() {

#Create Cell
echo "###### Create UNIT ADMIN Cell ######"
CURL_RESULT=`curl -w "\nstatus:%{http_code}\n" $DOMAIN/__ctl/Cell -X POST -H "Authorization: Bearer $MASTER_TOKEN" -H "X-Personium-Unit-User: $CELL_OWNER" -d "{\"Name\":\"$CELL_NAME\"}" -k -i -s`
CURL_RESULT=`curl -w "\nstatus:%{http_code}\n" https://$DOMAIN/__ctl/Cell -X POST -H "Authorization: Bearer $MASTER_TOKEN" -H "X-Personium-Unit-User: $CELL_OWNER" -d "{\"Name\":\"$CELL_NAME\"}" -k -i -s`
echo "$CURL_RESULT"

echo "-- Cell check"
CURL_RESULT=`curl -w "\nstatus:%{http_code}\n" "$DOMAIN/__ctl/Cell(%27$CELL_NAME%27)" -X GET -H "Authorization: Bearer $MASTER_TOKEN" -k -i -s`
CURL_RESULT=`curl -w "\nstatus:%{http_code}\n" "https://$DOMAIN/__ctl/Cell(%27$CELL_NAME%27)" -X GET -H "Authorization: Bearer $MASTER_TOKEN" -k -i -s`
echo "$CURL_RESULT"
check_response 200 "UNIT ADMIN Cell created"

Expand Down
2 changes: 1 addition & 1 deletion 1-server_unit/resource/nfs/opt/logback/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@

<logger name="io.personium.core.event" additivity="false">
<!-- To output the DEBUG level log of user script even in production, "DEBUG" is set -->
<level value="DEBUG" />
<level value="INFO" />
<appender-ref ref="FILE_USER" />
<appender-ref ref="stdout" />
</logger>
Expand Down
Loading

0 comments on commit 73cda50

Please sign in to comment.