Skip to content

Af20 #63

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Af20 #63

Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions dask_remote_jobqueue/templates/job_submit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ export _condor_SCHEDD_NAME={{ htc_schedd_name }}
export _condor_SCITOKENS_FILE={{ htc_scitoken_file }}
export _condor_SEC_DEFAULT_AUTHENTICATION_METHODS={{ htc_sec_method}}

cat $@
condor_submit -spool $@
2 changes: 1 addition & 1 deletion dask_remote_jobqueue/templates/scheduler.sub
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ executable = scheduler.sh
log = dask_scheduler.log
output = dask_scheduler.out
error = dask_scheduler.error
+SingularityImage = "/cvmfs/images.dodas.infn.it/registry.hub.docker.com/dodasts/dask-scheduler:v1"
+SingularityImage = "/cvmfs/unpacked.cern.ch/registry.hub.docker.com/dodasts/dask-scheduler:v1"
{{ selected_sitename }}
transfer_input_files = start_scheduler.py, scheduler.sh, /ca.crt, /tmp/token, job_submit.sh, job_rm.sh, .bashrc, config.yaml
environment = HOME=./; OIDC_CONFIG_DIR=./.oidc-agent; JHUB_TOKEN={{ token }};JHUB_USER={{ name }};SCHED_PORT={{ sched_port }};DASH_PORT={{ dash_port }};CONTROLLER_PORT={{ controller_port }};REFRESH_TOKEN={{ refresh_token }};IAM_SERVER={{ iam_server }};IAM_CLIENT_ID={{ client_id }};IAM_CLIENT_SECRET={{ client_secret }};_condor_AUTH_SSL_CLIENT_CAFILE={{ htc_ca }};_condor_TOOL_DEBUG={{ htc_debug }};_condor_COLLECTOR_HOST={{ htc_collector }}; _condor_SCHEDD_HOST={{ htc_schedd_host }};_condor_SCHEDD_NAME={{ htc_schedd_name }};_condor_SCITOKENS_FILE={{ htc_scitoken_file }};_condor_SEC_DEFAULT_AUTHENTICATION_METHODS={{ htc_sec_method}};SINGULARITY_WN_IMAGE={{ singularity_wn_image }}
Expand Down
20 changes: 5 additions & 15 deletions dask_remote_jobqueue/templates/start_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def __init__(self, *args, **kwargs):
sched_port = int(os.environ.get("SCHED_PORT", "42000"))
dash_port = int(os.environ.get("DASH_PORT", "42001"))
controller_port = int(os.environ.get("CONTROLLER_PORT", "42002"))
singularity_wn_image = os.environ.get("SINGULARITY_WN_IMAGE", "/cvmfs/images.dodas.infn.it/registry.hub.docker.com/dodasts/root-in-docker:ubuntu22-kernel-v1")
singularity_wn_image = os.environ.get("SINGULARITY_WN_IMAGE", "/cvmfs/unpacked.cern.ch/registry.hub.docker.com/dodasts/root-in-docker:ubuntu22-kernel-v1")

logger.debug(f"name: {name}")
logger.debug(f"token: {token}")
Expand Down Expand Up @@ -296,7 +296,7 @@ def run(self):
async def tunnel_scheduler():
logger.debug("start tunnel scheduler")
connection = await asyncssh.connect(
"jhub.131.154.96.124.myip.cloud.infn.it",
"jhub.131.154.98.185.myip.cloud.infn.it",
port=31022,
username=name,
password=token,
Expand All @@ -311,7 +311,7 @@ async def tunnel_scheduler():
async def tunnel_dashboard():
logger.debug("start tunnel dashboard")
connection = await asyncssh.connect(
"jhub.131.154.96.124.myip.cloud.infn.it",
"jhub.131.154.98.185.myip.cloud.infn.it",
port=31022,
username=name,
password=token,
Expand All @@ -326,7 +326,7 @@ async def tunnel_dashboard():
async def tunnel_controller():
logger.debug("start tunnel controller")
connection = await asyncssh.connect(
"jhub.131.154.96.124.myip.cloud.infn.it",
"jhub.131.154.98.185.myip.cloud.infn.it",
port=31022,
username=name,
password=token,
Expand Down Expand Up @@ -389,7 +389,7 @@ def get(self):
def prepare(self):
logger.debug(self.request.arguments)


class LogsHandler(tornado.web.RequestHandler):
def initialize(self, sched_q: Queue, controller_q: Queue):
self.sched_q: Queue = sched_q
Expand Down Expand Up @@ -424,22 +424,18 @@ async def get(self):
font-size: 15px;
border-bottom:
}

.active, .collapsible:hover {
background-color: #ec8f72;
}

.content {
padding: 0 18px;
display: none;
overflow: hidden;
background-color: #fafafa;
}

table, th, td {
border: 1px solid black;
}

table {
width: 100%;
}
Expand Down Expand Up @@ -545,7 +541,6 @@ async def get(self):
"""<script>
var coll = document.getElementsByClassName("collapsible");
var i;

for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
this.classList.toggle("active");
Expand All @@ -557,20 +552,16 @@ async def get(self):
}
});
}

window.onscroll = function() {myFunction()};

var header = document.getElementById("myHeader");
var sticky = header.offsetTop;

function myFunction() {
if (window.pageYOffset > sticky) {
header.classList.add("sticky");
} else {
header.classList.remove("sticky");
}
}

var origin_location = window.location.href;
function reload() {
window.location.href = origin_location;
Expand Down Expand Up @@ -666,7 +657,6 @@ def initialize(self, sched_q: Queue, controller_q: Queue):

def get(self):
"""Return a descriptive dictionary of worker specs.

Example worker_spec:
{
"HTCondorCluster-0": {
Expand Down