Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
certificates
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
smallstep
certificates
Commits
0d4f96c1
Commit
0d4f96c1
authored
6 years ago
by
Mariano Cano
Browse files
Options
Downloads
Patches
Plain Diff
Update renew with force flag.
Clean old certificates in volumes on start.
parent
f7154a9b
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/docker/Makefile
+3
-1
3 additions, 1 deletion
examples/docker/Makefile
examples/docker/renewer/crontab
+1
-1
1 addition, 1 deletion
examples/docker/renewer/crontab
examples/docker/renewer/entrypoint.sh
+10
-10
10 additions, 10 deletions
examples/docker/renewer/entrypoint.sh
with
14 additions
and
12 deletions
examples/docker/Makefile
+
3
−
1
View file @
0d4f96c1
...
@@ -5,7 +5,6 @@ binaries:
...
@@ -5,7 +5,6 @@ binaries:
GOOS
=
linux go build
-o
renewer/step github.com/smallstep/cli/cmd/step
GOOS
=
linux go build
-o
renewer/step github.com/smallstep/cli/cmd/step
build
:
build-nginx build-ca build-renewer
build
:
build-nginx build-ca build-renewer
build-nginx
:
build-nginx
:
docker build
-t
nginx-test:latest nginx
docker build
-t
nginx-test:latest nginx
build-ca
:
build-ca
:
...
@@ -21,3 +20,6 @@ down:
...
@@ -21,3 +20,6 @@ down:
inspect
:
inspect
:
step certificate inspect https://localhost:4443
--insecure
step certificate inspect https://localhost:4443
--insecure
.PHONY
:
all binaries up down inspect
.PHONY
:
build build-nginx build-ca build-renewer
This diff is collapsed.
Click to expand it.
examples/docker/renewer/crontab
+
1
−
1
View file @
0d4f96c1
# min hour day month weekday command
# min hour day month weekday command
* * * * *
rm -f /var/local/step/site-new.crt && step ca renew --out /var/local/step/site-new.crt /var/local/step/site.crt /var/local/step/site.key && mv /var/local/step/site-new.crt /var/local/step/site.crt
* * * * *
step ca renew --force /var/local/step/site.crt /var/local/step/site.key
This diff is collapsed.
Click to expand it.
examples/docker/renewer/entrypoint.sh
+
10
−
10
View file @
0d4f96c1
...
@@ -3,16 +3,16 @@
...
@@ -3,16 +3,16 @@
# Wait for CA
# Wait for CA
sleep
5
sleep
5
if
[
!
-f
/var/local/step/root_ca.crt
]
;
then
# Clean old certificates
rm
-f
/var/local/step/root_ca.crt
rm
-f
/var/local/step/site.crt /var/local/step/site.key
# Donwload the root certificate
# Donwload the root certificate
step ca root /var/local/step/root_ca.crt
step ca root /var/local/step/root_ca.crt
fi
if
[
!
-f
/var/local/step/site.crt
]
;
then
# Get token
# Get token
STEP_TOKEN
=
$(
step ca token
$COMMON_NAME
)
STEP_TOKEN
=
$(
step ca token
$COMMON_NAME
)
# Donwload the root certificate
# Donwload the root certificate
step ca certificate
--token
$STEP_TOKEN
$COMMON_NAME
/var/local/step/site.crt /var/local/step/site.key
step ca certificate
--token
$STEP_TOKEN
$COMMON_NAME
/var/local/step/site.crt /var/local/step/site.key
fi
exec
"
$@
"
exec
"
$@
"
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment