File tree 24 files changed +68
-54
lines changed
24 files changed +68
-54
lines changed Original file line number Diff line number Diff line change 1
1
<p align =" center " >
2
- <img alt="Lynx Logo" src="/assets/img/logo.png?v=0.12.7 " width="400" />
2
+ <img alt="Lynx Logo" src="/assets/img/logo.png?v=0.12.8 " width="400" />
3
3
<h3 align="center">Lynx</h3>
4
4
<p align="center">A Fast, Secure and Reliable Terraform Backend, Set up in Minutes.</p>
5
5
<p align="center">
6
6
<a href="https://github.com/Clivern/Lynx/actions/workflows/ci.yml">
7
7
<img src="https://github.com/Clivern/Lynx/actions/workflows/server_ci.yml/badge.svg"/>
8
8
</a>
9
9
<a href="https://github.com/Clivern/Lynx/releases">
10
- <img src="https://img.shields.io/badge/Version-0.12.7 -1abc9c.svg">
10
+ <img src="https://img.shields.io/badge/Version-0.12.8 -1abc9c.svg">
11
11
</a>
12
12
<a href="https://hub.docker.com/r/clivern/lynx/tags">
13
- <img src="https://img.shields.io/badge/Docker-0.12.7 -1abc9c.svg">
13
+ <img src="https://img.shields.io/badge/Docker-0.12.8 -1abc9c.svg">
14
14
</a>
15
15
<a href="https://github.com/Clivern/terraform-provider-lynx">
16
16
<img src="https://img.shields.io/badge/Terraform-Provider-yellow.svg">
Original file line number Diff line number Diff line change 7
7
license :
8
8
name : MIT License
9
9
url : https://github.com/Clivern/Lynx/blob/main/LICENSE
10
- version : 0.12.7
10
+ version : 0.12.8
11
11
externalDocs :
12
12
description : Find out more about lynx
13
13
url : https://github.com/Clivern/Lynx
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ version: '3.8'
2
2
3
3
services :
4
4
app1 :
5
- image : clivern/lynx:0.12.7
5
+ image : clivern/lynx:0.12.8
6
6
environment :
7
7
APP_NAME : Lynx
8
8
APP_PORT : 4001
@@ -27,7 +27,7 @@ services:
27
27
- db
28
28
29
29
app2 :
30
- image : clivern/lynx:0.12.7
30
+ image : clivern/lynx:0.12.8
31
31
environment :
32
32
APP_NAME : Lynx
33
33
APP_PORT : 4002
@@ -52,7 +52,7 @@ services:
52
52
- db
53
53
54
54
app3 :
55
- image : clivern/lynx:0.12.7
55
+ image : clivern/lynx:0.12.8
56
56
environment :
57
57
APP_NAME : Lynx
58
58
APP_PORT : 4003
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ version: '3.8'
2
2
3
3
services :
4
4
app :
5
- image : clivern/lynx:0.12.7
5
+ image : clivern/lynx:0.12.8
6
6
environment :
7
7
APP_NAME : Lynx
8
8
APP_PORT : 4000
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ version: '3.8'
2
2
3
3
services :
4
4
app :
5
- image : clivern/lynx:0.12.7
5
+ image : clivern/lynx:0.12.8
6
6
environment :
7
7
APP_NAME : Lynx
8
8
APP_PORT : 4000
Original file line number Diff line number Diff line change 21
21
icon : edit
22
22
23
23
download_link :
24
- label : Latest Release v0.12.7
25
- url : https://github.com/Clivern/Lynx/releases/tag/0.12.7
24
+ label : Latest Release v0.12.8
25
+ url : https://github.com/Clivern/Lynx/releases/tag/0.12.8
26
26
27
27
features :
28
28
rows :
Original file line number Diff line number Diff line change 1
1
terraform {
2
2
backend "http" {
3
- address = " http://localhost:4000/client/clivern/monitoring /prod/state"
4
- lock_address = " http://localhost:4000/client/clivern/monitoring /prod/lock"
5
- unlock_address = " http://localhost:4000/client/clivern/monitoring /prod/unlock"
3
+ address = " http://localhost:4000/client/clivern/grafana_infra /prod/state"
4
+ lock_address = " http://localhost:4000/client/clivern/grafana_infra /prod/lock"
5
+ unlock_address = " http://localhost:4000/client/clivern/grafana_infra /prod/unlock"
6
6
lock_method = " POST"
7
7
unlock_method = " POST"
8
8
}
Original file line number Diff line number Diff line change @@ -76,7 +76,6 @@ defmodule Lynx.Context.LockContext do
76
76
where: l . environment_id == ^ environment_id ,
77
77
where: l . is_active == true
78
78
)
79
- |> lock ( "FOR UPDATE" )
80
79
|> limit ( 1 )
81
80
|> Repo . one ( )
82
81
end
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ defmodule Lynx.Module.LockModule do
16
16
Lock an environment
17
17
"""
18
18
def lock_action ( params \\ % { } ) do
19
+ :sleeplocks . new ( 1 , name: :lynx_lock )
20
+
19
21
case TeamContext . get_team_by_slug ( params [ :t_slug ] ) do
20
22
nil ->
21
23
{ :not_found , "Team not found" }
@@ -43,16 +45,27 @@ defmodule Lynx.Module.LockModule do
43
45
is_active: true
44
46
} )
45
47
46
- case LockContext . create_lock ( lock ) do
47
- { :ok , _ } ->
48
- { :success , "" }
48
+ case :sleeplocks . attempt ( :lynx_lock ) do
49
+ :ok ->
50
+ case LockContext . create_lock ( lock ) do
51
+ { :ok , _ } ->
52
+ :sleeplocks . release ( :lynx_lock )
53
+ { :success , "" }
54
+
55
+ { :error , changeset } ->
56
+ :sleeplocks . release ( :lynx_lock )
57
+
58
+ messages =
59
+ changeset . errors ( )
60
+ |> Enum . map ( fn { field , { message , _options } } ->
61
+ "#{ field } : #{ message } "
62
+ end )
49
63
50
- { :error , changeset } ->
51
- messages =
52
- changeset . errors ( )
53
- |> Enum . map ( fn { field , { message , _options } } -> "#{ field } : #{ message } " end )
64
+ { :error , Enum . at ( messages , 0 ) }
65
+ end
54
66
55
- { :error , Enum . at ( messages , 0 ) }
67
+ { :error , :unavailable } ->
68
+ { :error , "Unable to hold a lock on environment" }
56
69
end
57
70
end
58
71
end
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ defmodule LynxWeb.Router do
133
133
134
134
defp add_server_header ( conn , _opts ) do
135
135
conn
136
- |> put_resp_header ( "x-server-version" , "lynx/0.12.7 " )
136
+ |> put_resp_header ( "x-server-version" , "lynx/0.12.8 " )
137
137
end
138
138
139
139
# Enables LiveDashboard only for development
Original file line number Diff line number Diff line change 26
26
< p > < a href = { Routes . page_path ( @ conn , :home ) } > <%= gettext "Back to Home" %> </ a > </ p >
27
27
< br />
28
28
< small >
29
- <%= gettext "Copyright © 2024 " %> < a href = "https://github.com/clivern " target = "_blank " rel = "noopener " > Clivern</ a > < br />
29
+ <%= gettext "Copyright © 2025 " %> < a href = "https://github.com/clivern " target = "_blank " rel = "noopener " > Clivern</ a > < br />
30
30
</ small >
31
31
</ div >
32
32
</ div >
Original file line number Diff line number Diff line change 26
26
< p > < a href = { Routes . page_path ( @ conn , :home ) } > <%= gettext "Back to Home" %> </ a > </ p >
27
27
< br />
28
28
< small >
29
- <%= gettext "Copyright © 2024 " %> < a href = "https://github.com/clivern " target = "_blank " rel = "noopener " > Clivern</ a > < br />
29
+ <%= gettext "Copyright © 2025 " %> < a href = "https://github.com/clivern " target = "_blank " rel = "noopener " > Clivern</ a > < br />
30
30
</ small >
31
31
</ div >
32
32
</ div >
Original file line number Diff line number Diff line change 31
31
< p > < a href = { Routes . page_path ( @ conn , :login ) } > <%= gettext "Login into your Account" %> </ a > </ p >
32
32
< br />
33
33
< small >
34
- <%= gettext "Copyright © 2024 " %> < a href = "https://github.com/clivern " target = "_blank " rel = "noopener " > Clivern</ a > < br />
34
+ <%= gettext "Copyright © 2025 " %> < a href = "https://github.com/clivern " target = "_blank " rel = "noopener " > Clivern</ a > < br />
35
35
</ small >
36
36
</ div >
37
37
</ div >
Original file line number Diff line number Diff line change 19
19
20
20
< div class = "col hp-flex-none w-auto hp-horizontal-block " >
21
21
< div class = "hp-header-logo d-flex align-items-end " >
22
- < a href = { Routes . page_path ( @ conn , :projects ) } >
22
+ < a href = { Routes . page_path ( @ conn , :profile ) } >
23
23
< img class = "hp-logo hp-sidebar-visible " src = { Routes . static_path ( @ conn , "/images/ico.png" ) } alt = "logo " >
24
24
< img class = "hp-logo hp-sidebar-hidden hp-dir-none hp-dark-none " src = { Routes . static_path ( @ conn , "/images/ico.png" ) } alt = "logo " >
25
25
< img class = "hp-logo hp-sidebar-hidden hp-dir-none hp-dark-block " src = { Routes . static_path ( @ conn , "/images/ico.png" ) } alt = "logo " >
321
321
< footer class = "w-100 py-18 px-16 py-sm-24 px-sm-32 hp-bg-color-black-20 hp-bg-color-dark-90 " >
322
322
< div class = "row " >
323
323
< div class = "col-12 " >
324
- < p class = "hp-badge-text fw-semibold mb-0 text-center text-sm-start hp-text-color-dark-30 " > <%= gettext "Copyright © 2024 Clivern. All rights Reserved" %> </ p >
324
+ < p class = "hp-badge-text fw-semibold mb-0 text-center text-sm-start hp-text-color-dark-30 " > <%= gettext "Copyright © 2025 Clivern. All rights Reserved" %> </ p >
325
325
</ div >
326
326
</ div >
327
327
</ footer >
Original file line number Diff line number Diff line change 463
463
< footer class = "w-100 py-18 px-16 py-sm-24 px-sm-32 hp-bg-color-black-20 hp-bg-color-dark-90 " >
464
464
< div class = "row " >
465
465
< div class = "col-12 " >
466
- < p class = "hp-badge-text fw-semibold mb-0 text-center text-sm-start hp-text-color-dark-30 " > <%= gettext "Copyright © 2024 Clivern. All rights Reserved" %> </ p >
466
+ < p class = "hp-badge-text fw-semibold mb-0 text-center text-sm-start hp-text-color-dark-30 " > <%= gettext "Copyright © 2025 Clivern. All rights Reserved" %> </ p >
467
467
</ div >
468
468
</ div >
469
469
</ footer >
Original file line number Diff line number Diff line change 476
476
< footer class = "w-100 py-18 px-16 py-sm-24 px-sm-32 hp-bg-color-black-20 hp-bg-color-dark-90 " >
477
477
< div class = "row " >
478
478
< div class = "col-12 " >
479
- < p class = "hp-badge-text fw-semibold mb-0 text-center text-sm-start hp-text-color-dark-30 " > <%= gettext "Copyright © 2024 Clivern. All rights Reserved" %> </ p >
479
+ < p class = "hp-badge-text fw-semibold mb-0 text-center text-sm-start hp-text-color-dark-30 " > <%= gettext "Copyright © 2025 Clivern. All rights Reserved" %> </ p >
480
480
</ div >
481
481
</ div >
482
482
</ footer >
Original file line number Diff line number Diff line change 12
12
13
13
< div class = "col hp-flex-none w-auto hp-horizontal-block " >
14
14
< div class = "hp-header-logo d-flex align-items-end " >
15
- < a href = { Routes . page_path ( @ conn , :projects ) } >
15
+ < a href = { Routes . page_path ( @ conn , :settings ) } >
16
16
< img class = "hp-logo hp-sidebar-visible " src = { Routes . static_path ( @ conn , "/images/ico.png" ) } alt = "logo " >
17
17
< img class = "hp-logo hp-sidebar-hidden hp-dir-none hp-dark-none " src = { Routes . static_path ( @ conn , "/images/ico.png" ) } alt = "logo " >
18
18
< img class = "hp-logo hp-sidebar-hidden hp-dir-none hp-dark-block " src = { Routes . static_path ( @ conn , "/images/ico.png" ) } alt = "logo " >
291
291
< footer class = "w-100 py-18 px-16 py-sm-24 px-sm-32 hp-bg-color-black-20 hp-bg-color-dark-90 " >
292
292
< div class = "row " >
293
293
< div class = "col-12 " >
294
- < p class = "hp-badge-text fw-semibold mb-0 text-center text-sm-start hp-text-color-dark-30 " > <%= gettext "Copyright © 2024 Clivern. All rights Reserved" %> </ p >
294
+ < p class = "hp-badge-text fw-semibold mb-0 text-center text-sm-start hp-text-color-dark-30 " > <%= gettext "Copyright © 2025 Clivern. All rights Reserved" %> </ p >
295
295
</ div >
296
296
</ div >
297
297
</ footer >
Original file line number Diff line number Diff line change 28
28
29
29
< div class = "col hp-flex-none w-auto hp-horizontal-block " >
30
30
< div class = "hp-header-logo d-flex align-items-end " >
31
- < a href = { Routes . page_path ( @ conn , :projects ) } >
31
+ < a href = { Routes . page_path ( @ conn , :snapshots ) } >
32
32
< img class = "hp-logo hp-sidebar-visible " src = { Routes . static_path ( @ conn , "/images/ico.png" ) } alt = "logo " >
33
33
< img class = "hp-logo hp-sidebar-hidden hp-dir-none hp-dark-none " src = { Routes . static_path ( @ conn , "/images/ico.png" ) } alt = "logo " >
34
34
< img class = "hp-logo hp-sidebar-hidden hp-dir-none hp-dark-block " src = { Routes . static_path ( @ conn , "/images/ico.png" ) } alt = "logo " >
506
506
< footer class = "w-100 py-18 px-16 py-sm-24 px-sm-32 hp-bg-color-black-20 hp-bg-color-dark-90 " >
507
507
< div class = "row " >
508
508
< div class = "col-12 " >
509
- < p class = "hp-badge-text fw-semibold mb-0 text-center text-sm-start hp-text-color-dark-30 " > <%= gettext "Copyright © 2024 Clivern. All rights Reserved" %> </ p >
509
+ < p class = "hp-badge-text fw-semibold mb-0 text-center text-sm-start hp-text-color-dark-30 " > <%= gettext "Copyright © 2025 Clivern. All rights Reserved" %> </ p >
510
510
</ div >
511
511
</ div >
512
512
</ footer >
Original file line number Diff line number Diff line change 23
23
24
24
< div class = "col hp-flex-none w-auto hp-horizontal-block " >
25
25
< div class = "hp-header-logo d-flex align-items-end " >
26
- < a href = { Routes . page_path ( @ conn , :projects ) } >
26
+ < a href = { Routes . page_path ( @ conn , :teams ) } >
27
27
< img class = "hp-logo hp-sidebar-visible " src = { Routes . static_path ( @ conn , "/images/ico.png" ) } alt = "logo " >
28
28
< img class = "hp-logo hp-sidebar-hidden hp-dir-none hp-dark-none " src = { Routes . static_path ( @ conn , "/images/ico.png" ) } alt = "logo " >
29
29
< img class = "hp-logo hp-sidebar-hidden hp-dir-none hp-dark-block " src = { Routes . static_path ( @ conn , "/images/ico.png" ) } alt = "logo " >
475
475
< footer class = "w-100 py-18 px-16 py-sm-24 px-sm-32 hp-bg-color-black-20 hp-bg-color-dark-90 " >
476
476
< div class = "row " >
477
477
< div class = "col-12 " >
478
- < p class = "hp-badge-text fw-semibold mb-0 text-center text-sm-start hp-text-color-dark-30 " > <%= gettext "Copyright © 2024 Clivern. All rights Reserved" %> </ p >
478
+ < p class = "hp-badge-text fw-semibold mb-0 text-center text-sm-start hp-text-color-dark-30 " > <%= gettext "Copyright © 2025 Clivern. All rights Reserved" %> </ p >
479
479
</ div >
480
480
</ div >
481
481
</ footer >
Original file line number Diff line number Diff line change 23
23
24
24
< div class = "col hp-flex-none w-auto hp-horizontal-block " >
25
25
< div class = "hp-header-logo d-flex align-items-end " >
26
- < a href = { Routes . page_path ( @ conn , :projects ) } >
26
+ < a href = { Routes . page_path ( @ conn , :users ) } >
27
27
< img class = "hp-logo hp-sidebar-visible " src = { Routes . static_path ( @ conn , "/images/ico.png" ) } alt = "logo " >
28
28
< img class = "hp-logo hp-sidebar-hidden hp-dir-none hp-dark-none " src = { Routes . static_path ( @ conn , "/images/ico.png" ) } alt = "logo " >
29
29
< img class = "hp-logo hp-sidebar-hidden hp-dir-none hp-dark-block " src = { Routes . static_path ( @ conn , "/images/ico.png" ) } alt = "logo " >
449
449
< footer class = "w-100 py-18 px-16 py-sm-24 px-sm-32 hp-bg-color-black-20 hp-bg-color-dark-90 " >
450
450
< div class = "row " >
451
451
< div class = "col-12 " >
452
- < p class = "hp-badge-text fw-semibold mb-0 text-center text-sm-start hp-text-color-dark-30 " > <%= gettext "Copyright © 2024 Clivern. All rights Reserved" %> </ p >
452
+ < p class = "hp-badge-text fw-semibold mb-0 text-center text-sm-start hp-text-color-dark-30 " > <%= gettext "Copyright © 2025 Clivern. All rights Reserved" %> </ p >
453
453
</ div >
454
454
</ div >
455
455
</ footer >
Original file line number Diff line number Diff line change @@ -10,13 +10,13 @@ defmodule LynxWeb.LockView do
10
10
"""
11
11
def render ( "lock_data.json" , % { lock: lock } ) do
12
12
% {
13
- ID: lock . tf_uuid ,
14
- Path: lock . tf_path ,
15
- Operation: lock . tf_operation ,
16
- Who: lock . tf_who ,
17
- Version: lock . tf_version ,
13
+ ID: lock . uuid ,
14
+ Path: lock . path ,
15
+ Operation: lock . operation ,
16
+ Who: lock . who ,
17
+ Version: lock . version ,
18
18
Created: lock . updated_at ,
19
- Info: lock . tf_info
19
+ Info: lock . info
20
20
}
21
21
end
22
22
Original file line number Diff line number Diff line change @@ -10,13 +10,13 @@ defmodule LynxWeb.StateView do
10
10
"""
11
11
def render ( "lock_data.json" , % { lock: lock } ) do
12
12
% {
13
- ID: lock . tf_uuid ,
14
- Path: lock . tf_path ,
15
- Operation: lock . tf_operation ,
16
- Who: lock . tf_who ,
17
- Version: lock . tf_version ,
13
+ ID: lock . uuid ,
14
+ Path: lock . path ,
15
+ Operation: lock . operation ,
16
+ Who: lock . who ,
17
+ Version: lock . version ,
18
18
Created: lock . updated_at ,
19
- Info: lock . tf_info
19
+ Info: lock . info
20
20
}
21
21
end
22
22
Original file line number Diff line number Diff line change 5
5
defmodule Lynx.MixProject do
6
6
use Mix.Project
7
7
8
- @ version "0.12.7 "
8
+ @ version "0.12.8 "
9
9
10
10
def get_version , do: @ version
11
11
@@ -57,7 +57,8 @@ defmodule Lynx.MixProject do
57
57
{ :gettext , "~> 0.25" } ,
58
58
{ :jason , "~> 1.4" } ,
59
59
{ :plug_cowboy , "~> 2.5" } ,
60
- { :bcrypt_elixir , "~> 3.0" }
60
+ { :bcrypt_elixir , "~> 3.0" } ,
61
+ { :sleeplocks , "~> 1.0" }
61
62
]
62
63
end
63
64
You can’t perform that action at this time.
0 commit comments