Skip to content
Merged
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
155 changes: 106 additions & 49 deletions _docs/administration/user-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,19 @@ As a user in Codefresh, you can manage your account by authorizing access to you
* Authorize Git providers
The Git personal token is a user-specific access token, required to authenticate Git-based actions from Codefresh clients, per provisioned runtime.

The authorization method depends on the Git provider and on what authorization has been set up by ypur adin.

The authorization method depends on the Git provider and on what authorization has been set up by your account admin.


If your admin has set up authentication with OAuth2, you can authorize access using OAuth2.
Or, you can always generate a personal access token from your Git provider and then add the same to Codefresh to authorize access.

> If you have access to more than one runtime, you can use the same token for multiple runtimes.
You must however authorize access individually for each runtime.
You must however authorize access individually for each runtime.

{::nomarkdown}
</br>
{:/}

### Enable access for Codefresh support
Enable Codefresh support personnel to access your user account. Access to your account is useful for visibility during troubleshooting.
Expand All @@ -40,87 +47,137 @@ You can disable this security setting at any time.
max-width="50%"
%}

### Authorize Git access with OAuth or personal access tokens
Authorize Git access with OAuth2 if your account admin has set up Codefresh as an OAuth application, or alternatively through personal access tokens from your Git provider.
* For OAuth2: The adminstrator pre-configures the permissions and expiry date. Once you supply your credentials for authorization, you are automatically directed to the Git Personal Tokens page.

#### Generate personal access token for GitHub

#### Authorize access for Bitbucket
Bitbucket requires your Bitbucket account name and a personal access token to authorize access.

**Generate personal access token**

1. Log in to your Bitbucket Cloud or Server account.
1. Select **Manage account > Account settings > Personal access tokens**.
1. Select these scopes: `repository write`,`Project read`.
1. Copy the personal access token generated as you will need it to authorize access.

**How to**
1. In the Codefresh UI, go to [User Settings](https://g.codefresh.io/2.0/user-settings){:target="\_blank"}.
1. Select the runtime, and then select one of the following:
* To add a token, select **Add Token**.
* To update an existing token by replacing it with a new token, select **Update Token**.
1. From the **Select Git provider** drop-down, select **Bitbucket**.
1. In the **Bitbucket username field**, enter the username of your Bitbucket account.
1. In the **Bitbucket Personal Access Token** field, paste the token you generated.

<!---add new screenshot> -->
{::nomarkdown}
</br>
{:/}

### Authorize Git access in Codefresh
Authorize Git access with OAuth2 if your account admin has set up Codefresh as an OAuth application, or alternatively through personal access tokens from your Git provider.
>Notes:
For OAuth2: The adminstrator pre-configures the permissions and expiry date. Once you supply your credentials for authorization, you are automatically directed to the Git Personal Tokens page.

{:start="6"}
1. Click **Add Token**.
In the Git Personal Access Tokens list, you can see that the new token is assigned to the runtime.
**Before you begin**

#### Authorize access for GitHub
**Before you begin**
Make sure you have:
* For Bitbucket only, your Bitbucket account username
* If needed, a _personal access token_ with the required scopes:
* [GitHub]({{site.baseurl}}/docs/reference/git-tokens/#github-tokens)
* [GitLab]({{site.baseurl}}/docs/reference/git-tokens/#gitlab-tokens)
* [Bitbucket]({{site.baseurl}}/docs/reference/git-tokens/#bitbucket-tokens)
* If needed, a _personal access token_ from your Git provider with the required scopes:
* [GitHub]({{site.baseurl}}/#generate-github-personal-access-tokens)
* [GitLab]({{site.baseurl}}/#generate-gitlab-personal-access-tokens)
* [Bitbucket]({{site.baseurl}}/#generate-bitbucket-personal-access-tokens)


**How to**
1. In the Codefresh UI, go to [User Settings](https://g.codefresh.io/2.0/user-settings){:target="\_blank"}.
1. Select the runtime, and then select one of the following:
1. Select the runtime, and then do one of the following:
* To add a token, select **Add Token**.
* To update an existing token by replacing it with a new token, select **Update Token**.
1. For OAuth2:
1. For **OAuth2**:
> If the application is not registered, the button is disabled. Contact your admin for help.
* Click **Authorize Access to GitHub**.
* Enter your credentials, and select **Sign In**.
* Complete the verification if required, as when two-factor authentication is configured, for example.
<!---add new screenshot> -->

{:start="4"}
1. For Git personal access tokens:

For **Git personal access tokens**:
* Expand **Advanced authorization options**.
<!---* For Bitbucket, enter your **Bitbucket username**. -->
* In the **Git Personal Access Token** field, paste the token you generated.
* For Bitbucket, enter your **Bitbucket username**.
* In the **Personal Access Token** field, paste the token you generated.

<!---add new screenshot> -->


{:start="5"}
1. Click **Add Token**.
1. Click **Add Token**.
In the Git Personal Access Tokens list, you can see that the new token is assigned to the runtime.

{::nomarkdown}
</br>
{:/}

#### Generate GitHub personal access tokens


1. Log in to your GitHub or GitHub Enterprise account.
1. Select **Settings > Developer Settings > Personal Access Tokens > Tokens (classic)**.
1. Define the following:
* Token name
* Expiration date
* Select scope: `repo`

{% include
image.html
lightbox="true"
file="/images/administration/user-settings/github-pat-scopes.png"
url="/images/administration/user-settings/github-pat-scopes.png"
alt="GitHub personal access token scopes"
caption="GitHub personal access token scopes"
max-width="50%"
%}

{::nomarkdown}
<br>
{:start="4"}
1. Copy the personal access token generated as you will need it to authorize access.

{::nomarkdown}
</br>
{:/}

#### Generate GitLab personal access tokens


1. Log in to your GitLab Cloud or Server account.
1. Select **User settings > Access tokens**.
1. Define the following:
* Token name
* Expiration date
* Select these scopes: `read_api', 'read_user`, `read_repository`

{% include
image.html
lightbox="true"
file="/images/administration/user-settings/gitlab-pat-scopes.png"
url="/images/administration/user-settings/gitlab-pat-scopes.png"
alt="GitLab personal access token scopes"
caption="GitLab personal access token scopes"
max-width="50%"
%}

{:start="4"}
1. Copy the personal access token generated as you will need it to authorize access.





{::nomarkdown}
</br>
{:/}

#### Generate Bitbucket personal access tokens


1. Log in to your Bitbucket Cloud or Server account.
1. Select **Personal Settings > App passwords**.
1. Define the **Label**.
Select these scopes:
* **Permissions**: `Read`
* **Workspace membership**: `Read`
* **Webhooks**: `Read and write`
* **Repositories**: `Write`, `Admin`

{% include
image.html
lightbox="true"
file="/images/administration/user-settings/bitbucket-pat-scopes.png"
url="/images/administration/user-settings/bitbucket-pat-scopes.png"
alt="Bitbucket personal access token scopes"
caption="Bitbucket personal access token scopes"
max-width="50%"
%}

{:start="4"}
1. Copy the personal access token generated as you will need it to authorize access.

{::nomarkdown}
</br>
{:/}

### Related articles
[Git tokens in Codefresh]({{site.baseurl}}/docs/reference/git-tokens/)
18 changes: 0 additions & 18 deletions _docs/getting-started/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,6 @@ The App-Proxy performs write and state-change operations:
<br>
{:/}

#### Request Routing Service
The Request Routing Service is installed on the same cluster as the Codefresh Runtime in the customer environment.
It receives requests from the Ingress Controller, and forwards the request URLs to the Application Proxy, and webhooks directly to the Event Sources.


> Important:
The Request Routing Service is available from runtime version 0.0.543 and higher.
Older runtime versions are not affected as there is complete backward compatibility, and the Ingress Controller continues to route incoming requests.

{::nomarkdown}
<br>
{:/}

#### Argo Project

The Argo Project includes:
Expand Down Expand Up @@ -161,11 +148,6 @@ See [Ingress controller]({{site.baseurl}}/docs/runtime/requirements/#ingress-con
<br>
{:/}






#### Managed clusters
Managed clusters are external clusters registered to a provisioned hosted or hybrid runtime(s).

Expand Down
15 changes: 5 additions & 10 deletions _docs/runtime/hosted-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ toc: true
If you have Codefresh's Hosted GitOps, set up your hosted environment, and you are all ready to leverage extensive CD Ops capabilities.
Read about [Hosted GitOps]({{site.baseurl}}/docs/incubation/intro-hosted-runtime/).


### Where to start with Hosted GitOps
If you have not provisioned a hosted runtime, Codefresh presents you with the setup instructions in the **Home** dashboard.

Expand Down Expand Up @@ -119,17 +118,19 @@ max-width="70%"
* [Download the CLI]({{site.baseurl}}/docs/clients/csdp-cli/).

1. Uninstall the failed hosted runtime:
`cf runtime uninstall hosted-codefresh --force`
`cf runtime uninstall codefresh-hosted --force`
where:
`hosted-codefresh` is the name of your hosted runtime, automatically assigned by Codefresh.
1. In the Codefresh UI, return to Codefresh [Home](https://g.codefresh.io/2.0/?time=LAST_7_DAYS){:target="\_blank"}.
1. Refresh the page and start with _1. Provision hosted runtime_ above.


### 2. Connect Git provider
Connect your hosted runtime to a Git provider for Codefresh to create the required Git repos. First authorize access to your Git provider through an OAuth token, and then select the Git organizations or accounts in which to create the required Git repos.
Connect your hosted runtime to a Git provider for Codefresh to create the required Git repos. First authorize access to your Git provider through an OAuth token, and then select the Git organizations or accounts in which to create the required Git repos.

>Only authorized organizations are displayed in the list. To authorize organizations for the Codefresh application in GitHub, see [Authorize organizations/projects]({{site.baseurl}}/docs/administration/hosted-authorize-orgs/).


{% include
image.html
lightbox="true"
Expand All @@ -140,17 +141,11 @@ caption="Step 2: Connect to Git provider"
max-width="80%"
%}

You can connect your hosted runtime to any of these Git providers:
* GitHub (the default)
* Bitbucket Cloud
<!---* GitLab -->

>If the hosted runtime is the first runtime you are provisioning for your account, the Git provider you connect to is used for any hybrid runtimes you provision for the same account. This is because of the configuration repo that is created and shared by runtimes in the same account.

Once you authorize access, Codefresh creates two Git repositories, one to store the runtime configuration settings, and the other to store the runtime's application settings:
* Shared runtime configuration repo

The shared runtime configuration repo is a centralized Git repository that stores configuration settings for the hosted runtime. Additional runtimes provisioned for the account point to this repo to retrieve and reuse the configuration.
The shared runtime configuration repo is a centralized Git repository that stores configuration settings for the hosted runtime. Additional runtimes provisioned for the account can point to this repo to retrieve and reuse the configuration.
Read about [Shared configuration repo]({{site.baseurl}}/docs/reference/shared-configuration/).

* Git Source application repo
Expand Down
9 changes: 3 additions & 6 deletions _docs/runtime/installation-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,13 @@ Codefresh Runtime creates three repositories in your organization's Git provider

* Codefresh runtime installation repository
* Codefresh Git Sources
* Codefresh shared configuration repository
* Codefresh shared configuration repository. It does so for two types of entities:

<!---**Codefresh Runtime functionality**


**Codefresh Runtime functionality**
**Codefresh Runtime finctionality**
The runtime:
* Ensures that the installation repository and the Git Sources are always in sync, and applies Git changes back to the cluster
* Receives events and information from the user's organization systems to execute workflows
By default, the ingress controller directs all requests and events to the Codefresh Application Proxy. When internal and an external ingress hosts are configured, the ingress comtroller directs webhook events to the relevant Event Source and then to Argo Events (not via the Codefresh Application Proxy).-->
By default, the ingress controller directs all requests and events to the Codefresh Application Proxy. When internal and an external ingress hosts are configured, the ingress comtroller directs webhook events to the relevant Event Source and then to Argo Events (not via the Codefresh Application Proxy).

### Hosted vs.Hybrid environments

Expand Down
Loading