Skip to content
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

PMM-12940 Run watchtower with AMI. #3074

Merged
merged 72 commits into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
d9f43fc
PMM-12940 Run watchtower next to pmm server container.
talhabinrizwan May 6, 2024
8faf161
PMM-12940 Run watchtower next to pmm server container.
talhabinrizwan May 7, 2024
8c6e7e8
PMM-12940 Run watchtower next to pmm server container.
talhabinrizwan May 7, 2024
a6f3864
PMM-12940 Run watchtower next to pmm server container.
talhabinrizwan May 7, 2024
fa6cd1b
PMM-12940 Run watchtower next to pmm server container.
talhabinrizwan May 7, 2024
fc35c7a
PMM-12940 Run watchtower next to pmm server container.
talhabinrizwan May 7, 2024
3c626a2
PMM-12940 Run watchtower next to pmm server container.
talhabinrizwan May 7, 2024
6a5569e
PMM-12940 Run watchtower next to pmm server container.
talhabinrizwan May 7, 2024
a10cf05
PMM-12940 No restart container.
BupycHuk May 30, 2024
0da8b60
PMM-12940 Increase disk space.
talhabinrizwan May 31, 2024
eeb4f94
Merge branch 'refs/heads/v3' into PMM-12940-watchtower-pmm
BupycHuk Jul 10, 2024
15a4511
PMM-12940 AMI Improvements.
BupycHuk Jul 16, 2024
9a95268
PMM-13053 Set instance ID as password.
BupycHuk Jul 16, 2024
be89a67
Merge branch 'v3' into PMM-12940-watchtower-pmm-nurlan
BupycHuk Jul 16, 2024
3e22b47
PMM-13053 Add role.
BupycHuk Jul 17, 2024
4587acd
PMM-12940 volume mount.
BupycHuk Jul 17, 2024
417fd7a
PMM-12940 user mapping.
BupycHuk Jul 17, 2024
8859127
PMM-12940 fix init-admin-password script.
BupycHuk Jul 17, 2024
284fab0
PMM-12940 fix roles init order.
BupycHuk Jul 17, 2024
40852eb
PMM-12940 fix roles init order.
BupycHuk Jul 17, 2024
1ed471f
PMM-12940 Distribution method.
BupycHuk Jul 17, 2024
43c4024
PMM-12940 Make init-admin-password work.
BupycHuk Jul 17, 2024
c99534a
PMM-12940 Make init-admin-password wait until container is healthy.
BupycHuk Jul 17, 2024
cd74ec9
PMM-12940 PMM init order.
BupycHuk Jul 17, 2024
0a30556
PMM-12940 fix init-admin-password ansible job.
BupycHuk Jul 17, 2024
9747740
PMM-12940 revert moving of lvm-init.
BupycHuk Jul 17, 2024
e7450cc
PMM-12940 home directory and initialization.
BupycHuk Jul 18, 2024
14406bb
PMM-12940 home directory and initialization.
BupycHuk Jul 18, 2024
df730f2
Merge branch 'v3' into PMM-12940-watchtower-pmm-nurlan
BupycHuk Jul 18, 2024
83c4801
PMM-12940 Fix test.
BupycHuk Jul 18, 2024
f38c89b
Merge remote-tracking branch 'refs/remotes/origin/v3' into PMM-12940-…
BupycHuk Jul 18, 2024
1d87780
PMM-12940 Fix initizalization.
BupycHuk Jul 18, 2024
723c044
PMM-12940 Fix build.
BupycHuk Jul 18, 2024
04a05e6
PMM-12940 Fix build.
BupycHuk Jul 18, 2024
e62a148
PMM-12940 Fix linters.
BupycHuk Jul 18, 2024
3604514
PMM-12940 Fix linters.
BupycHuk Jul 18, 2024
45a6fdd
PMM-12940 Fix linters.
BupycHuk Jul 18, 2024
0b3a2d4
PMM-12940 Set need_initialization correctly.
BupycHuk Jul 18, 2024
5656726
PMM-12940 remove must setup.
BupycHuk Jul 18, 2024
1a7fac9
PMM-12940 use FB(should be reverted).
BupycHuk Jul 19, 2024
2dec203
PMM-12940 improve entrypoint.
BupycHuk Jul 19, 2024
918f747
PMM-12940 use new PMM Image.
BupycHuk Jul 19, 2024
ae84f48
PMM-12940 move init admin password into container.
BupycHuk Jul 19, 2024
61a8fcd
PMM-12940 detect AMI distribution.
BupycHuk Jul 19, 2024
23f906e
PMM-12940 default env var for PMM Server Image.
BupycHuk Jul 19, 2024
78e6f31
PMM-12940 use new FB.
BupycHuk Jul 19, 2024
2d5ff84
PMM-12940 Fix build.
BupycHuk Jul 19, 2024
c288afc
PMM-12940 print environment file content.
BupycHuk Jul 19, 2024
6124e4f
PMM-12940 fix entrypoint.
BupycHuk Jul 20, 2024
f5f931b
PMM-12940 fix pmm distribution detection.
BupycHuk Jul 20, 2024
44eee41
PMM-12940 fix AMI detection.
BupycHuk Jul 20, 2024
0b6f872
PMM-12940 fix AMI detection.
BupycHuk Jul 20, 2024
87db6e0
PMM-12940 fix AMI detection.
BupycHuk Jul 21, 2024
013f108
PMM-12940 change order on AMI build.
BupycHuk Jul 21, 2024
469303e
PMM-12940 change admin user to pmm user in ansible.
BupycHuk Jul 21, 2024
41a5b12
PMM-12940 fix logic of change admin password.
BupycHuk Jul 21, 2024
84cd01c
PMM-12940 Drop additional file.
BupycHuk Jul 21, 2024
00ec757
PMM-12940 use ENV instead of file for AMI distribution.
BupycHuk Jul 22, 2024
7e8013a
PMM-13053 Cleanup.
BupycHuk Jul 22, 2024
2713bb8
Merge branch 'v3' into PMM-12940-watchtower-pmm-nurlan
BupycHuk Jul 22, 2024
2861fef
PMM-13053 fix tests.
BupycHuk Jul 22, 2024
809e6fb
PMM-13053 Add changelog.
BupycHuk Jul 22, 2024
145be95
Merge branch 'v3' into PMM-12940-watchtower-pmm-nurlan
BupycHuk Jul 23, 2024
3d181b0
PMM-13063 remove unnecessary ansible step.
BupycHuk Jul 23, 2024
d2752d5
PMM-13063 use 3-dev-latest instead of FB in makefile.
BupycHuk Jul 23, 2024
10e3dcd
PMM-12940 use custom docker image for OVF.
BupycHuk Jul 23, 2024
65cd0a4
PMM-13280 create .ssh directory on OVF.
BupycHuk Jul 29, 2024
e6a19f1
PMM-12940 ignore PMM ready errors.
BupycHuk Jul 30, 2024
7b700f0
Merge branch 'v3' into PMM-12940-watchtower-pmm-nurlan
BupycHuk Jul 30, 2024
1823d22
PMM-12940 create empty authorized_keys file.
BupycHuk Jul 31, 2024
87e75da
Merge remote-tracking branch 'refs/remotes/origin/v3' into PMM-12940-…
BupycHuk Aug 3, 2024
ff98d8e
PMM-12940 update descriptors.
BupycHuk Aug 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 0 additions & 91 deletions api-tests/server/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"net/http/httputil"
"net/url"
"strconv"
"strings"
"testing"
"time"

Expand Down Expand Up @@ -98,96 +97,6 @@ func TestAuth(t *testing.T) {
})
}

func TestSetup(t *testing.T) {
t.Parallel()
// make a BaseURL without authentication
baseURL, err := url.Parse(pmmapitests.BaseURL.String())
require.NoError(t, err)
baseURL.User = nil

// make client that does not follow redirects
client := &http.Client{
CheckRedirect: func(req *http.Request, via []*http.Request) error {
return http.ErrUseLastResponse
},
}

t.Run("WebPage", func(t *testing.T) {
t.Parallel()

uri := baseURL.ResolveReference(&url.URL{
Path: "/setup",
})
t.Logf("URI: %s", uri)
req, err := http.NewRequestWithContext(pmmapitests.Context, http.MethodGet, uri.String(), nil)
require.NoError(t, err)
req.Header.Set("X-Test-Must-Setup", "1")

resp, b := doRequest(t, client, req) //nolint:bodyclose

assert.Equal(t, 200, resp.StatusCode, "response:\n%s", b)
assert.True(t, strings.HasPrefix(string(b), `<!doctype html>`), string(b))
})

t.Run("Redirect", func(t *testing.T) {
t.Parallel()
paths := map[string]int{
"graph": 303,
"graph/": 303,
"prometheus": 303,
"prometheus/": 303,
"swagger": 200,
"swagger/": 301,

"v1/server/readyz": 200,
"v1/server/AWSInstance": 400, // It must accept a parameter
"v1/server/version": 401, // Grafana authentication required
}
for path, code := range paths {
path, code := path, code
t.Run(fmt.Sprintf("%s=%d", path, code), func(t *testing.T) {
t.Parallel()

uri := baseURL.ResolveReference(&url.URL{
Path: path,
})
t.Logf("URI: %s", uri)
req, err := http.NewRequestWithContext(pmmapitests.Context, http.MethodGet, uri.String(), nil)
require.NoError(t, err)
req.Header.Set("X-Test-Must-Setup", "1")

resp, b := doRequest(t, client, req) //nolint:bodyclose

assert.Equal(t, code, resp.StatusCode, "response:\n%s", b)
if code == 303 {
assert.Equal(t, "/setup", resp.Header.Get("Location"))
}
})
}
})

t.Run("API", func(t *testing.T) {
t.Parallel()

q := make(url.Values)
q.Set("instance_id", "123")
uri := baseURL.ResolveReference(&url.URL{
Path: "v1/server/AWSInstance",
RawQuery: q.Encode(),
})
t.Logf("URI: %s", uri)
require.NoError(t, err)
req, err := http.NewRequestWithContext(pmmapitests.Context, http.MethodGet, uri.String(), nil)
require.NoError(t, err)
req.Header.Set("X-Test-Must-Setup", "1")

resp, b := doRequest(t, client, req) //nolint:bodyclose

assert.Equal(t, 200, resp.StatusCode, "response:\n%s", b)
assert.Equal(t, "{}", string(b), "response:\n%s", b)
})
}

func TestSwagger(t *testing.T) {
t.Parallel()
for _, path := range []string{
Expand Down

This file was deleted.

Loading
Loading