Skip to content

Commit

Permalink
Temp Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharpz7 committed Oct 14, 2023
1 parent 17846b2 commit 965d2c8
Show file tree
Hide file tree
Showing 80 changed files with 1,674 additions and 1,674 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ Forward these ports:
- 10000: Lookoutv2 API
- 8080: Armada Server API

and go to: http://localhost:8089
and go to: http://127.0.0.1:8089
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
runs-on: ubuntu-22.04

env:
ARMADA_EXECUTOR_INGRESS_URL: "http://localhost"
ARMADA_EXECUTOR_INGRESS_URL: "http://127.0.0.1"
ARMADA_EXECUTOR_INGRESS_PORT: 5001
# Cache Docker layers in the GitHub actions cache.
# These variables are picked up by the goreleaser config.
Expand Down
10 changes: 5 additions & 5 deletions client/DotNet/Armada.Client.Test/Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class Tests
[Explicit("Intended for manual testing against armada server with proxy.")]
public async Task TestWatchingEvents()
{
var client = new ArmadaClient("http://localhost:8080", new HttpClient());
var client = new ArmadaClient("http://127.0.0.1:8080", new HttpClient());

var queue = "test";
var jobSet = $"set-{Guid.NewGuid()}";
Expand Down Expand Up @@ -46,7 +46,7 @@ public async Task TestSimpleJobSubmitFlow()
var queue = "test";
var jobSet = $"set-{Guid.NewGuid()}";

IArmadaClient client = new ArmadaClient("http://localhost:8080", new HttpClient());
IArmadaClient client = new ArmadaClient("http://127.0.0.1:8080", new HttpClient());
await client.CreateQueueAsync(new ApiQueue {Name = queue, PriorityFactor = 200});

var request = CreateJobRequest(jobSet);
Expand All @@ -65,16 +65,16 @@ public async Task TestSimpleJobSubmitFlow()
public async Task TestProcessingUnknownEvents()
{
var mockHttp = new MockHttpMessageHandler();
mockHttp.When("http://localhost:8080/*")
mockHttp.When("http://127.0.0.1:8080/*")
.Respond("application/json",
@"{""result"":{""Id"":""1593611590122-0"",""message"":{""Queued"":{""JobId"":""01ec5ae6f9wvya6cr6stzwty7v"",""JobSetId"":""set-bae48cc8-9f70-465f-ae5c-c92713b5f24f"",""Queue"":""test"",""Created"":""2020-07-01T13:53:10.122263955Z""}}}}
{""result"":{""Id"":""1593611590122-0"",""message"":{""UnknownEvent"":""test""}}}
{""error"": ""test error""}
{}
{""a"":""b""}");

IArmadaClient client = new ArmadaClient("http://localhost:8080", new HttpClient(mockHttp));
IArmadaClient client = new ArmadaClient("http://127.0.0.1:8080", new HttpClient(mockHttp));
var events = (await client.GetJobEventsStream("queue", "jobSet", watch: false)).ToList();
Assert.That(events.Count(), Is.EqualTo(2));
Assert.That(events[0].Result.Message.Event, Is.Not.Null);
Expand Down
2,976 changes: 1,488 additions & 1,488 deletions client/DotNet/Armada.Client/ClientGenerated.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/DotNet/ArmadaProject.Io.Client.Test/Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public async Task TestSimpleJobSubmitFlow()
{
var queue = "test";
var jobSetId = Guid.NewGuid().ToString();
var channel = CreateChannel(new Uri("http://localhost:8080"), ChannelCredentials.Insecure);
var channel = CreateChannel(new Uri("http://127.0.0.1:8080"), ChannelCredentials.Insecure);

try
{
Expand Down
4 changes: 2 additions & 2 deletions client/python/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Please see the [python client docs](https://github.com/armadaproject/armada/blob

> Each example has three enviromental variables for setup
> ```bash
> export ARMADA_SERVER=localhost
> export ARMADA_SERVER=127.0.0.1
> export ARMADA_PORT=443
> export DISABLE_SSL=true
>```
Expand Down Expand Up @@ -308,7 +308,7 @@ def get_jwt():
def get_grpc_channel(jwt):
channel = grpc.secure_channel(
"localhost:50051",
"127.0.0.1:50051",
grpc.composite_channel_credentials(
grpc.local_channel_credentials(),
grpc.metadata_call_credentials(GrpcAuth("Bearer " + jwt)),
Expand Down
4 changes: 2 additions & 2 deletions client/python/examples/cancelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ def workflow():

if __name__ == "__main__":
# Note that the form of ARMADA_SERVER should be something like
# domain.com, localhost, or 0.0.0.0
# domain.com, 127.0.0.1, or 0.0.0.0
DISABLE_SSL = os.environ.get("DISABLE_SSL", False)
HOST = os.environ.get("ARMADA_SERVER", "localhost")
HOST = os.environ.get("ARMADA_SERVER", "127.0.0.1")
PORT = os.environ.get("ARMADA_PORT", "50051")

workflow()
Expand Down
4 changes: 2 additions & 2 deletions client/python/examples/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ def workflow():

if __name__ == "__main__":
# Note that the form of ARMADA_SERVER should be something like
# domain.com, localhost, or 0.0.0.0
# domain.com, 127.0.0.1, or 0.0.0.0
DISABLE_SSL = os.environ.get("DISABLE_SSL", False)
HOST = os.environ.get("ARMADA_SERVER", "localhost")
HOST = os.environ.get("ARMADA_SERVER", "127.0.0.1")
PORT = os.environ.get("ARMADA_PORT", "50051")

workflow()
Expand Down
4 changes: 2 additions & 2 deletions client/python/examples/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ def main():

if __name__ == "__main__":
# Note that the form of ARMADA_SERVER should be something like
# domain.com, localhost, or 0.0.0.0
# domain.com, 127.0.0.1, or 0.0.0.0
DISABLE_SSL = os.environ.get("DISABLE_SSL", False)
HOST = os.environ.get("ARMADA_SERVER", "localhost")
HOST = os.environ.get("ARMADA_SERVER", "127.0.0.1")
PORT = os.environ.get("ARMADA_PORT", "50051")

try:
Expand Down
4 changes: 2 additions & 2 deletions client/python/examples/queues.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ def workflow():

if __name__ == "__main__":
# Note that the form of ARMADA_SERVER should be something like
# domain.com, localhost, or 0.0.0.0
# domain.com, 127.0.0.1, or 0.0.0.0
DISABLE_SSL = os.environ.get("DISABLE_SSL", False)
HOST = os.environ.get("ARMADA_SERVER", "localhost")
HOST = os.environ.get("ARMADA_SERVER", "127.0.0.1")
PORT = os.environ.get("ARMADA_PORT", "50051")

workflow()
Expand Down
4 changes: 2 additions & 2 deletions client/python/examples/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ def simple_workflow():

if __name__ == "__main__":
# Note that the form of ARMADA_SERVER should be something like
# domain.com, localhost, or 0.0.0.0
# domain.com, 127.0.0.1, or 0.0.0.0
DISABLE_SSL = os.environ.get("DISABLE_SSL", False)
HOST = os.environ.get("ARMADA_SERVER", "localhost")
HOST = os.environ.get("ARMADA_SERVER", "127.0.0.1")
PORT = os.environ.get("ARMADA_PORT", "50051")

simple_workflow()
Expand Down
2 changes: 1 addition & 1 deletion client/python/tests/integration/test_no_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def wait_for(client: ArmadaClient, queue, job_set_id=None):

@pytest.fixture(scope="session", name="client")
def no_auth_client() -> ArmadaClient:
server_name = os.environ.get("ARMADA_SERVER", "localhost")
server_name = os.environ.get("ARMADA_SERVER", "127.0.0.1")
server_port = os.environ.get("ARMADA_PORT", "50051")
server_ssl = os.environ.get("ARMADA_SSL", "false")

Expand Down
2 changes: 1 addition & 1 deletion cmd/armada/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func main() {
if config.PprofPort != nil {
go func() {
server := &http.Server{
Addr: fmt.Sprintf("localhost:%d", *config.PprofPort),
Addr: fmt.Sprintf("127.0.0.1:%d", *config.PprofPort),
Handler: pprofMux,
}
log := log.NewEntry(log.New())
Expand Down
4 changes: 2 additions & 2 deletions cmd/armadactl/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ func RootCmd() *cobra.Command {
Use: "armadactl",
Short: "armadactl controls the Armada batch job queueing system.",
Long: `armadactl controls the Armada batch job queueing system.
Persistent config can be saved in a config file so it doesn't have to be specified every command.
Example structure:
armadaUrl: localhost:50051
armadaUrl: 127.0.0.1:50051
basicAuth:
username: user1
password: password123
Expand Down
2 changes: 1 addition & 1 deletion cmd/eventsprinter/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func RootCmd() *cobra.Command {
return logic.PrintEvents(url, topic, subscription, verbose)
},
}
cmd.PersistentFlags().String("url", "pulsar://localhost:6650", "URL to connect to Pulsar on.")
cmd.PersistentFlags().String("url", "pulsar://127.0.0.1:6650", "URL to connect to Pulsar on.")
cmd.PersistentFlags().Bool("verbose", false, "Print full event sequences.")
cmd.PersistentFlags().String("subscription", "eventsprinter", "Subscription to connect to Pulsar on.")
cmd.PersistentFlags().String("topic", "events", "Pulsar topic to subscribe to.")
Expand Down
2 changes: 1 addition & 1 deletion cmd/pulsartest/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func RootCmd() *cobra.Command {
Short: "pulsartest provides tools for generating and observing Pulsar events.",
}

cmd.PersistentFlags().String("url", "pulsar://localhost:6650", "URL to connect to Pulsar on.")
cmd.PersistentFlags().String("url", "pulsar://127.0.0.1:6650", "URL to connect to Pulsar on.")
cmd.PersistentFlags().Bool("authenticationEnabled", false, "Use authentication.")
cmd.PersistentFlags().String("authenticationType", "JWT", "Authentication type")
cmd.PersistentFlags().String("jwtTokenPath", "", "Path of JWT file")
Expand Down
8 changes: 4 additions & 4 deletions config/armada/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ grpcPort: 50051
httpPort: 8080
metricsPort: 9000
corsAllowedOrigins:
- http://localhost:3000
- http://localhost:8089
- http://localhost:10000
- http://127.0.0.1:3000
- http://127.0.0.1:8089
- http://127.0.0.1:10000
grpcGatewayPath: "/"
cancelJobsBatchSize: 1000
pulsarSchedulerEnabled: false
probabilityOfUsingPulsarScheduler: 0
ignoreJobSubmitChecks: false
schedulerApiConnection:
armadaUrl: "localhost:50052"
armadaUrl: "127.0.0.1:50052"
grpc:
keepaliveParams:
maxConnectionIdle: 5m
Expand Down
4 changes: 2 additions & 2 deletions config/binoculars/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ grpcPort: 50051
httpPort: 8080
metricsPort: 9000
corsAllowedOrigins:
- http://localhost:3000
- http://localhost:8080
- http://127.0.0.1:3000
- http://127.0.0.1:8080
cordon:
additionalLabels:
armadaproject.io/cordon-reason: "binoculars"
Expand Down
6 changes: 3 additions & 3 deletions config/lookoutv2/config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiPort: 10000
corsAllowedOrigins:
- "http://localhost:3000"
- "http://localhost:8089"
- "http://localhost:10000"
- "http://127.0.0.1:3000"
- "http://127.0.0.1:8089"
- "http://127.0.0.1:10000"
tls:
enabled: false
certPath: /certs/tls.crt
Expand Down
4 changes: 2 additions & 2 deletions config/scheduleringester/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ postgres:
maxIdleConns: 1
connMaxLifetime: 30m
connection:
host: localhost
host: 127.0.0.1
port: 5432
user: postgres
password: psw
Expand All @@ -14,7 +14,7 @@ metrics:
port: 9003

pulsar:
URL: "pulsar://localhost:6650"
URL: "pulsar://127.0.0.1:6650"
jobsetEventsTopic: "events"
receiveTimeout: 5s
backoffTime: 1s
Expand Down
6 changes: 3 additions & 3 deletions developer/airflow/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ services:
ports:
- "${AIRFLOW_WEBSERVER_PORT}:${AIRFLOW_WEBSERVER_PORT}"
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:${AIRFLOW_WEBSERVER_PORT}/health"]
test: ["CMD", "curl", "--fail", "http://127.0.0.1:${AIRFLOW_WEBSERVER_PORT}/health"]
interval: 30s
timeout: 10s
retries: 5
Expand All @@ -141,7 +141,7 @@ services:
<<: *airflow-common
command: scheduler
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8974/health"]
test: ["CMD", "curl", "--fail", "http://127.0.0.1:8974/health"]
interval: 30s
timeout: 10s
retries: 5
Expand Down Expand Up @@ -298,7 +298,7 @@ services:
ports:
- "5555:5555"
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:5555/"]
test: ["CMD", "curl", "--fail", "http://127.0.0.1:5555/"]
interval: 30s
timeout: 10s
retries: 5
Expand Down
2 changes: 1 addition & 1 deletion developer/env/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ This folder contains all the enviromental variables that are required to run.

If a component is not listed as a file here, it does not require any enviromental variables to run.

Note that [localhost_access](./localhost_access.env) is a special case for running the components outside of docker.
Note that [127.0.0.1_access](./127.0.0.1_access.env) is a special case for running the components outside of docker.
2 changes: 1 addition & 1 deletion developer/env/binoculars.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ARMADA_CORSALLOWEDORIGINS="http://localhost:3000,http://localhost:8089,http://example.com:8089"
ARMADA_CORSALLOWEDORIGINS="http://127.0.0.1:3000,http://127.0.0.1:8089,http://example.com:8089"
12 changes: 6 additions & 6 deletions developer/env/localhost_access.env
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# For Server and Executor
CGO_ENABLED=0
ARMADA_REDIS_ADDRS="localhost:6379"
ARMADA_EVENTSAPIREDIS_ADDRS="localhost:6379"
ARMADA_EVENTAPI_POSTGRES_CONNECTION_HOST="localhost"
ARMADA_POSTGRES_CONNECTION_HOST="localhost"
ARMADA_PULSAR_URL="pulsar://localhost:6650"
ARMADA_APICONNECTION_ARMADAURL="localhost:50051"
ARMADA_REDIS_ADDRS="127.0.0.1:6379"
ARMADA_EVENTSAPIREDIS_ADDRS="127.0.0.1:6379"
ARMADA_EVENTAPI_POSTGRES_CONNECTION_HOST="127.0.0.1"
ARMADA_POSTGRES_CONNECTION_HOST="127.0.0.1"
ARMADA_PULSAR_URL="pulsar://127.0.0.1:6650"
ARMADA_APICONNECTION_ARMADAURL="127.0.0.1:50051"
ARMADA_SCHEDULING_EXECUTORUPDATEFREQUENCY=1s

# For Executor
Expand Down
6 changes: 3 additions & 3 deletions developer/env/lookout.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARMADA_UICONFIG_ARMADAAPIBASEURL="http://localhost:8080"
ARMADA_UICONFIG_BINOCULARSBASEURLPATTERN="http://localhost:8082"
ARMADA_UICONFIG_LOOKOUTV2APIBASEURL="http://localhost:10000"
ARMADA_UICONFIG_ARMADAAPIBASEURL="http://127.0.0.1:8080"
ARMADA_UICONFIG_BINOCULARSBASEURLPATTERN="http://127.0.0.1:8082"
ARMADA_UICONFIG_LOOKOUTV2APIBASEURL="http://127.0.0.1:10000"

# ARMADA_UICONFIG_ARMADAAPIBASEURL="http://example.com:8080"
# ARMADA_UICONFIG_BINOCULARSBASEURLPATTERN="http://example.com:8082"
Expand Down
2 changes: 1 addition & 1 deletion developer/env/lookoutv2.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ARMADA_POSTGRES_CONNECTION_DBNAME=postgresv2
ARMADA_POSTGRES_CONNECTION_PORT=5432
ARMADA_CORSALLOWEDORIGINS="http://localhost:3000,http://localhost:8089,http://localhost:10000,http://example.com:10000,http://example.com:8089"
ARMADA_CORSALLOWEDORIGINS="http://127.0.0.1:3000,http://127.0.0.1:8089,http://127.0.0.1:10000,http://example.com:10000,http://example.com:8089"
2 changes: 1 addition & 1 deletion developer/env/server-pulsar.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EXECUTOR_UPDATE_INTERVAL="1s"
ARMADA_CORSALLOWEDORIGINS=="http://localhost:3000,http://localhost:8089,http://localhost:10000,http://example.com:10000,http://example.com:8089"
ARMADA_CORSALLOWEDORIGINS=="http://127.0.0.1:3000,http://127.0.0.1:8089,http://127.0.0.1:10000,http://example.com:10000,http://example.com:8089"
ARMADA_PULSARSCHEDULERENABLED="true"
ARMADA_PROBABILITYOFUSINGPULSARSCHEDULER="1"
2 changes: 1 addition & 1 deletion developer/env/server.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
EXECUTOR_UPDATE_INTERVAL="1s"
ARMADA_CORSALLOWEDORIGINS=="http://localhost:3000,http://localhost:8089,http://localhost:10000,http://example.com:10000,http://example.com:8089"
ARMADA_CORSALLOWEDORIGINS=="http://127.0.0.1:3000,http://127.0.0.1:8089,http://127.0.0.1:10000,http://example.com:10000,http://example.com:8089"
22 changes: 11 additions & 11 deletions docs/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ You can also run the same commands yourself:
go run cmd/armadactl/main.go create queue e2e-test-queue

# To allow Ingress tests to pass
export ARMADA_EXECUTOR_INGRESS_URL="http://localhost"
export ARMADA_EXECUTOR_INGRESS_URL="http://127.0.0.1"
export ARMADA_EXECUTOR_INGRESS_PORT=5001

go run cmd/testsuite/main.go test --tests "testsuite/testcases/basic/*" --junit junit.xml
```

### Running the UI

In LocalDev, the UI is built seperately with `mage ui`. To access it, open http://localhost:8089 in your browser.
In LocalDev, the UI is built seperately with `mage ui`. To access it, open http://127.0.0.1:8089 in your browser.

For more information see the [UI Developer Guide](./developer/ui.md).

Expand Down Expand Up @@ -190,15 +190,15 @@ External Debug Port Mappings:
|Armada service |Debug host |
|-------------------|--------------|
|server |localhost:4000|
|executor |localhost:4001|
|binoculars |localhost:4002|
|eventingester |localhost:4003|
|lookout |localhost:4004|
|lookoutv2 |localhost:4005|
|lookoutingester |localhost:4006|
|lookoutingesterv2 |localhost:4007|
|jobservice |localhost:4008|
|server |127.0.0.1:4000|
|executor |127.0.0.1:4001|
|binoculars |127.0.0.1:4002|
|eventingester |127.0.0.1:4003|
|lookout |127.0.0.1:4004|
|lookoutv2 |127.0.0.1:4005|
|lookoutingester |127.0.0.1:4006|
|lookoutingesterv2 |127.0.0.1:4007|
|jobservice |127.0.0.1:4008|
### Other Debugging Methods
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/aws-ec2.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Note: As of June 2022, not all Armada dependencies reliably build on a Mac M1 us
- During selection of instance, Add a large volume to your ec2 instance. 100 gb of storage is recommended.
- When selecting the instance, you will have the opportunity to choose a security group. You may need to make a new one. Be sure to add a rule allowing inbound communication on port 22 so that you can access your server via SSH. We recommend that you restrict access to the IP address from which you access the Internet, or a small CIDR block containing it.

If you want to use your browser to access Armada Lookout UI or other web-based interfaces, you will also need to grant access to their respective ports. For added security, consider using an [SSH tunnel](https://www.ssh.com/academy/ssh/tunneling/example) from your local machine to your development server instead of opening those ports. You can add LocalForward to your ssh config: `LocalForward 4000 localhost:3000`
If you want to use your browser to access Armada Lookout UI or other web-based interfaces, you will also need to grant access to their respective ports. For added security, consider using an [SSH tunnel](https://www.ssh.com/academy/ssh/tunneling/example) from your local machine to your development server instead of opening those ports. You can add LocalForward to your ssh config: `LocalForward 4000 127.0.0.1:3000`

- ### Install [Docker](https://www.cyberciti.biz/faq/how-to-install-docker-on-amazon-linux-2/)

Expand Down
Loading

0 comments on commit 965d2c8

Please sign in to comment.