@@ -4,6 +4,7 @@ config.define_string("windows-bash-path", args=False, usage="Path to bash.exe fo
44config .define_string ("default-pull-policy" , args = False , usage = "Pull policy to use for containers" )
55config .define_string ("host-ip" , args = False , usage = "IP Address of the host to enable redirection to local services" )
66config .define_string ("hostname" , args = False , usage = "Accessible name of the host to enable redirection to local services" )
7+ config .define_string ("faf-data-dir" , args = False , usage = "Directory where the FAF Data lives normally C:/ProgramData/FAForever on Windows" )
78config .define_string_list ("local-services" , args = False , usage = "Names of services that you intend to run locally" )
89cfg = config .parse ()
910windows_bash_path = cfg .get ("windows-bash-path" , "C:\\ Program Files\\ Git\\ bin\\ bash.exe" )
@@ -12,6 +13,7 @@ local_services = cfg.get("local-services", [])
1213
1314data_relative_path = ".local-data"
1415if os .name == "nt" :
16+ faf_data_dir = cfg .get ("faf-data-dir" , "C:/ProgramData/FAForever" )
1517 if not os .path .exists (windows_bash_path ):
1618 fail ("Windows users need to supply a valid path to a bash executable" )
1719
@@ -28,6 +30,7 @@ if os.name == "nt":
2830 fail ("Cannot determine how to mount for windows host" )
2931
3032else :
33+ faf_data_dir = cfg .get ("faf-data-dir" , "" )
3134 hostname = cfg .get ("hostname" , "" )
3235 data_absolute_path = os .path .join (os .getcwd (), data_relative_path )
3336 use_named_volumes = []
@@ -180,6 +183,8 @@ def proxy_local_service_if_set(service_name, service_chart, service_namespace, a
180183 service_config_yaml , service_yaml = filter_yaml (service_yaml , kind = "ConfigMap|Secret" )
181184 service_config_yaml = patch_config (yaml = service_config_yaml , config_name = service_name , config = config_patch )
182185 if (service_config_yaml ):
186+ if service_name == "faf-lobby-server" :
187+ service_config_yaml = no_policy_server (service_config_yaml )
183188 k8s_yaml (service_config_yaml )
184189 config_objects = []
185190 for object in decode_yaml_stream (service_config_yaml ):
@@ -205,8 +210,6 @@ def proxy_local_service_if_set(service_name, service_chart, service_namespace, a
205210 service_objects .append (object ["metadata" ]["name" ] + ":" + object ["kind" ].lower ())
206211 k8s_resource (new_name = service_name , objects = service_objects , resource_deps = all_service_deps , labels = user_service_labels , links = user_service_links , pod_readiness = "ignore" )
207212 else :
208- if service_name == "faf-lobby-server" :
209- service_yaml = no_policy_server (service_yaml )
210213 if service_name == "faf-icebreaker" :
211214 service_yaml = remove_init_container (service_yaml )
212215
@@ -223,6 +226,7 @@ def extract_ingress_details(yaml):
223226 return ["port=" + str (service ["port" ]), "name=" + service ["name" ]]
224227
225228agnostic_local_resource ("create-hosts-file-content" , cmd = ["./tilt/scripts/print-hosts.sh" ], labels = ["core" ], auto_init = False , trigger_mode = TRIGGER_MODE_MANUAL , allow_parallel = True )
229+ agnostic_local_resource ("populate-featured-mod-files" , cmd = ["./tilt/scripts/update-faf-featured-mod.sh" , faf_data_dir ], labels = ["database" ], resource_deps = ["faf-db-migrations" ], auto_init = False , trigger_mode = TRIGGER_MODE_MANUAL , allow_parallel = True )
226230
227231k8s_yaml ("cluster/namespaces.yaml" )
228232k8s_yaml (helm_with_build_cache ("infra/clusterroles" , namespace = "faf-infra" , values = ["config/local.yaml" ]))
@@ -351,12 +355,12 @@ k8s_resource(new_name="faf-policy-server-config", objects=["faf-policy-server:co
351355user_service_deps = ["faf-db-migrations" , "ory-hydra" ]
352356user_service_labels = ["user" ]
353357user_service_links = [link ("http://user.localhost/register" , "User Service Registration" )]
354- proxy_local_service_if_set (service_name = "faf-user-service" , service_chart = "apps/faf-user-service" , service_namespace = "faf-apps" , service_deps = user_service_deps , service_labels = user_service_labels , service_links = user_service_links , config_patch = {"HYDRA_TOKEN_ISSUER" : "http://ory-hydra:4444" , "HYDRA_JWKS_URL" : "http://ory-hydra:4444/.well-known/jwks.json" , "LOBBY_URL" :"ws://localhost:8003 " , "REPLAY_URL" :"ws://localhost:15001 " })
358+ proxy_local_service_if_set (service_name = "faf-user-service" , service_chart = "apps/faf-user-service" , service_namespace = "faf-apps" , service_deps = user_service_deps , service_labels = user_service_labels , service_links = user_service_links , config_patch = {"HYDRA_TOKEN_ISSUER" : "http://ory-hydra:4444" , "HYDRA_JWKS_URL" : "http://ory-hydra:4444/.well-known/jwks.json" , "LOBBY_URL" :"ws://ws. localhost" , "REPLAY_URL" :"ws://replay-ws. localhost" })
355359
356360website_deps = ["wordpress" ]
357361website_labels = ["website" ]
358362website_links = [link ("http://www.localhost" , "FAForever Website" )]
359- proxy_local_service_if_set (service_name = "faf-website" , service_chart = "apps/faf-website" , service_namespace = "faf-apps" , service_deps = website_deps , service_labels = website_labels , service_links = website_links , additional_values = ["apps/faf-website/values-prod.yaml" ], config_patch = {"OAUTH_URL" : "http://ory-hydra:4444" , "OAUTH_PUBLIC_URL" : "http://hydra.localhost:4444 " , "API_URL" : "http://faf-api:8010" , "WP_URL" : "http://wordpress:80" })
363+ proxy_local_service_if_set (service_name = "faf-website" , service_chart = "apps/faf-website" , service_namespace = "faf-apps" , service_deps = website_deps , service_labels = website_labels , service_links = website_links , additional_values = ["apps/faf-website/values-prod.yaml" ], config_patch = {"OAUTH_URL" : "http://ory-hydra:4444" , "OAUTH_PUBLIC_URL" : "http://hydra.localhost" , "API_URL" : "http://faf-api:8010" , "WP_URL" : "http://wordpress:80" })
360364
361365api_deps = ["faf-db-migrations" , "ory-hydra" ] + rabbitmq_setup_resources
362366api_labels = ["api" ]
0 commit comments