New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor into individual executables #48
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
241e6bd
New app shell construct and an example usage
bifurcation e6a580e
Migration of CA to individual binary
bifurcation 95bbaec
Add vim temp files to .gitignore
bifurcation 02f33d2
Better example AMQP URL
bifurcation 6beaa6a
Migration of VA to individual binary
bifurcation a24dbc3
Removing extra config file
bifurcation 0d2fd0f
Migration of SA to individual binary
bifurcation 01db1d2
Migration of RA to individual binary
bifurcation be5a529
Migration of WFE to individual binary
bifurcation e40ac05
Resolving build issues
bifurcation dc12317
Removing boulder-start (obsolete)
bifurcation 5a6fdfc
Moving example to /test/
bifurcation File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ _cgo_export.* | |
|
||
_testmain.go | ||
|
||
*.swp | ||
*.exe | ||
*.test | ||
*.prof | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright 2014 ISRG. All rights reserved | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
package main | ||
|
||
import ( | ||
"github.com/letsencrypt/boulder/ca" | ||
"github.com/letsencrypt/boulder/cmd" | ||
"github.com/letsencrypt/boulder/rpc" | ||
) | ||
|
||
func main() { | ||
app := cmd.NewAppShell("boulder-ca") | ||
app.Action = func(c cmd.Config) { | ||
ch := cmd.AmqpChannel(c.AMQP.Server) | ||
|
||
sac, err := rpc.NewStorageAuthorityClient(c.AMQP.SA.Client, c.AMQP.SA.Client, ch) | ||
cmd.FailOnError(err, "Failed to create SA client") | ||
|
||
cai, err := ca.NewCertificateAuthorityImpl(c.CA.Server, c.CA.AuthKey, c.CA.Profile) | ||
cmd.FailOnError(err, "Failed to create CA impl") | ||
|
||
cai.SA = &sac | ||
|
||
cas, err := rpc.NewCertificateAuthorityServer(c.AMQP.CA.Server, ch, cai) | ||
cmd.FailOnError(err, "Unable to create CA server") | ||
|
||
cmd.RunForever(cas) | ||
} | ||
|
||
app.Run() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright 2014 ISRG. All rights reserved | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
package main | ||
|
||
import ( | ||
"github.com/letsencrypt/boulder/cmd" | ||
"github.com/letsencrypt/boulder/ra" | ||
"github.com/letsencrypt/boulder/rpc" | ||
) | ||
|
||
func main() { | ||
app := cmd.NewAppShell("boulder-sa") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. typo: boulder-ra |
||
app.Action = func(c cmd.Config) { | ||
ch := cmd.AmqpChannel(c.AMQP.Server) | ||
|
||
vac, err := rpc.NewValidationAuthorityClient(c.AMQP.VA.Client, c.AMQP.VA.Server, ch) | ||
cmd.FailOnError(err, "Unable to create VA client") | ||
|
||
cac, err := rpc.NewCertificateAuthorityClient(c.AMQP.CA.Client, c.AMQP.CA.Server, ch) | ||
cmd.FailOnError(err, "Unable to create CA client") | ||
|
||
sac, err := rpc.NewStorageAuthorityClient(c.AMQP.SA.Client, c.AMQP.SA.Server, ch) | ||
cmd.FailOnError(err, "Unable to create SA client") | ||
|
||
rai := ra.NewRegistrationAuthorityImpl() | ||
rai.VA = &vac | ||
rai.CA = &cac | ||
rai.SA = &sac | ||
|
||
ras, err := rpc.NewRegistrationAuthorityServer(c.AMQP.RA.Server, ch, &rai) | ||
cmd.FailOnError(err, "Unable to create RA server") | ||
cmd.RunForever(ras) | ||
} | ||
|
||
app.Run() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright 2014 ISRG. All rights reserved | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
package main | ||
|
||
import ( | ||
// Load both drivers to allow configuring either | ||
_ "github.com/go-sql-driver/mysql" | ||
_ "github.com/mattn/go-sqlite3" | ||
|
||
"github.com/letsencrypt/boulder/cmd" | ||
"github.com/letsencrypt/boulder/rpc" | ||
"github.com/letsencrypt/boulder/sa" | ||
) | ||
|
||
func main() { | ||
app := cmd.NewAppShell("boulder-sa") | ||
app.Action = func(c cmd.Config) { | ||
ch := cmd.AmqpChannel(c.AMQP.Server) | ||
|
||
sai, err := sa.NewSQLStorageAuthority(c.SA.DBDriver, c.SA.DBName) | ||
cmd.FailOnError(err, "Failed to create SA impl") | ||
|
||
sas := rpc.NewStorageAuthorityServer(c.AMQP.SA.Server, ch, sai) | ||
cmd.RunForever(sas) | ||
} | ||
|
||
app.Run() | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be
*.sw?
, sometimes Vim creates.swo
,.swm
, etc.