The allies signed the deal amid concerns about Russia and the prospect of weakened US commitments to European security.