-
Notifications
You must be signed in to change notification settings - Fork 148
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
V1 controller with agent #561
Changes from 9 commits
81aec2c
d369884
fb5beb1
096f5c4
144744f
d2366fb
45e0e8b
e84d34a
a0b2542
cc808f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Shipper | ||
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. please rename to |
||
cmd: elastic-agent-shipper | ||
args: [] | ||
artifact: elastic-agent-shipper | ||
restart_on_output_change: true | ||
|
||
rules: | ||
- fix_stream: {} | ||
- filter: | ||
selectors: | ||
- shipper | ||
|
||
when: length(${shipper}) > 0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -689,9 +689,19 @@ func packageAgent(requiredPackages []string, packagingFn func()) { | |
} | ||
} | ||
} else { | ||
// This shouldn't be needed as a special append() here, but until our artiface APIs have released shipper packages, | ||
// we need to make sure the package command doesn't try to download a shipper tarball and blow up | ||
packedBeats = append(packedBeats, "elastic-agent-shipper") | ||
// build from local repo, will assume beats repo is located on the same root level | ||
fmt.Println(">>> Building from local repo") | ||
for _, b := range packedBeats { | ||
pwd, err := filepath.Abs(filepath.Join("../beats/x-pack", b)) | ||
var pwd string | ||
var err error | ||
if !strings.Contains(b, "beat") { | ||
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. i'd rather have this explicitely configured e.g changing packedBeats to a struct or a map where key is a beat name and value is |
||
pwd, err = filepath.Abs(filepath.Join("../", b)) | ||
} else { | ||
pwd, err = filepath.Abs(filepath.Join("../beats/x-pack", b)) | ||
} | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
@@ -729,6 +739,7 @@ func packageAgent(requiredPackages []string, packagingFn func()) { | |
} | ||
|
||
func fetchBinaryFromArtifactsApi(ctx context.Context, packageName, artifact, version, downloadPath string) error { | ||
fmt.Printf(">>> About to download: %s\n", packageName) | ||
location, err := downloads.FetchBeatsBinary( | ||
ctx, | ||
packageName, | ||
|
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.
is this used?
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 is the packaging spec that's called from the shipper itself during
mage package
.