Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
POCS
cozy
easy-cozy
Commits
2c90e0d8
Commit
2c90e0d8
authored
Aug 22, 2019
by
Nicolas PERNOUD
Browse files
feat: added remove instance script
parent
e45a7c84
Changes
2
Hide whitespace changes
Inline
Side-by-side
create-instance.sh
View file @
2c90e0d8
...
...
@@ -17,10 +17,10 @@ echo "Creating instance ${INSTANCE_ID}.${COZY_TLD} ..."
docker-compose
exec
cozy ./cozy instances add
--host
0.0.0.0
--apps
drive,collect,settings,home
"
${
INSTANCE_ID
}
.
${
COZY_TLD
}
"
|
tee
"
${
TMPFILE
}
"
# Install grand lyon apps
docker-compose
exec
cozy ./cozy konnectors
install
enedis-scraping-connector
--
all-
domain
s
git
://forge.grandlyon.com/pocs/cozy/enedis-scraping-connector
.git#
build
docker-compose
exec
cozy ./cozy
app
s
install
energy-dataviz
--all-domains
git://forge.grandlyon.com/pocs/cozy/energy-dataviz.git#build
docker-compose
exec
cozy ./cozy konnectors
install
grdf-scr
api
ng
-connector
--
all-
domain
s
git://forge.grandlyon.com/pocs/cozy/grdf-scr
api
ng
-connector
.git#build
docker-compose
exec
cozy ./cozy
konnector
s
install
e
gl-api-connector
--all-domains
git://forge.grandlyon.com/pocs/cozy/egl-api-connector.git#build
docker-compose
exec
cozy ./cozy konnectors
install
enedis-scraping-connector
--domain
=
${
INSTANCE_ID
}
.
${
COZY_TLD
}
https
://forge.grandlyon.com/pocs/cozy/enedis-scraping-connector
/-/archive/build/enedis-scraping-connector-
build
.tar
docker-compose
exec
cozy ./cozy
konnector
s
install
grdf-scraping-connector
--domain
=
${
INSTANCE_ID
}
.
${
COZY_TLD
}
https://forge.grandlyon.com/pocs/cozy/grdf-scraping-connector/-/archive/master/grdf-scraping-connector-master.tar
docker-compose
exec
cozy ./cozy konnectors
install
egl-
api-connector
--domain
=
${
INSTANCE_ID
}
.
${
COZY_TLD
}
https://forge.grandlyon.com/pocs/cozy/egl-api-connector/-/archive/master/egl-
api-connector
-master.tar
docker-compose
exec
cozy ./cozy
app
s
install
e
nergy-dataviz
--domain
=
${
INSTANCE_ID
}
.
${
COZY_TLD
}
https://forge.grandlyon.com/pocs/cozy/energy-dataviz/-/archive/master/energy-dataviz-master.tar
## To replace by registry://store/something after next cozy-stack release
docker-compose
exec
cozy ./cozy apps
install
--domain
"
${
INSTANCE_ID
}
.
${
COZY_TLD
}
"
store registry://store/stable |
tee
-a
"
${
TMPFILE
}
"
...
...
remove-instance.sh
0 → 100644
View file @
2c90e0d8
#!/usr/bin/env bash
# creates an instance with the default apps and grand lyon apps installed
if
[
$#
-ne
1
]
;
then
echo
"Usage:
$0
<instance url>"
exit
1
fi
INSTANCE_ID
=
$1
source
.env
TMPFILE
=
$(
mktemp
/tmp/cozyXXX
)
echo
"Removing instance
${
INSTANCE_ID
}
.
${
COZY_TLD
}
..."
docker-compose
exec
cozy ./cozy instances destroy
--host
0.0.0.0
"
${
INSTANCE_ID
}
.
${
COZY_TLD
}
"
|
tee
"
${
TMPFILE
}
"
# TODO find a better way to detect if there was an error
TOKEN
=
""
if
[
$(
grep
-ic
ERROR
${
TMPFILE
}
)
-eq
0
]
;
then
TOKEN
=
$(
grep
token
"
${
TMPFILE
}
"
|
cut
-f2
-d
":"
|
tr
-d
'" '
)
fi
rm
"
${
TMPFILE
}
"
if
[
-z
"
${
TOKEN
}
"
]
;
then
echo
No token found.
exit
1
fi
Write
Preview
Supports
Markdown
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