예제 #1
0
파일: stack.go 프로젝트: koding/koding
func newStack(bs *provider.BaseStack) (provider.Stack, error) {
	s := &Stack{
		BaseStack:         bs,
		EntrypointBaseURL: "https://koding-klient.s3.amazonaws.com/entrypoint",
		ScreenURL:         "https://koding-dl.s3.amazonaws.com/screen.tar.gz",
		CertURL:           "https://koding-dl.s3.amazonaws.com/ca-certificates.crt.gz",
		KlientURL:         stack.Konfig.KlientGzURL(),
	}

	bs.PlanFunc = s.plan
	bs.StateFunc = s.state

	return s, nil
}
예제 #2
0
파일: vagrant.go 프로젝트: koding/koding
func newStack(bs *provider.BaseStack) (provider.Stack, error) {
	if bs.TunnelURL == "" {
		return nil, errors.New("no tunnel URL provided")
	}

	u, err := url.Parse(bs.TunnelURL)
	if err != nil {
		return nil, err
	}

	u.Path = "/kite"

	s := &Stack{
		BaseStack: bs,
		TunnelURL: u,
		api: &vagrantapi.Klient{
			Kite:  bs.Session.Kite,
			Log:   bs.Log.New("vagrantapi"),
			Debug: bs.Debug || bs.TraceID != "",
		},
	}

	bs.Planner.OnDial = s.checkTunnel
	bs.PlanFunc = s.plan

	return s, nil
}
예제 #3
0
파일: stack.go 프로젝트: koding/koding
func newStack(bs *provider.BaseStack) (provider.Stack, error) {
	s := &Stack{
		BaseStack: bs,
	}

	bs.SSHKeyPairFunc = s.setSSHKeyPair

	return s, nil
}