Skip to content

Commit

Permalink
Merge pull request #23 from telepresenceio/donnyyung/add-nightly
Browse files Browse the repository at this point in the history
Add nightly build docs
  • Loading branch information
Donny Yung committed Jul 14, 2021
2 parents 7dcd3ee + 9ffa87b commit cac1e2e
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 4 deletions.
2 changes: 1 addition & 1 deletion howtos/outbound.md
Expand Up @@ -75,7 +75,7 @@ When using this option, it is important to include all namespaces containing ser

An intercept with the flag`--local-only` can be used to control outbound connectivity to specific namespaces.

When developing services that have not yet been deployed to the cluster, it can be necessary to provide outbound connectivity to the namespace where the service is intended to be deployed so that it can access other services in that namespace without using qualified names.
When developing services that have not yet been deployed to the cluster, it can be necessary to provide outbound connectivity to the namespace where the service is intended to be deployed so that it can access other services in that namespace without using qualified names. Worth noting though, is that a local-only intercept will not cause outbound connections to originate from the intercepted namespace. Only a real intercept can do that. The reason for this is that in order to establish correct origin, the connection must be routed to a `traffic-agent`of an intercepted pod. For local-only intercepts, the outbound connections will originate from the `traffic-manager`.

```
$ telepresence intercept <deployment name> --namespace <namespace> --local-only
Expand Down
20 changes: 19 additions & 1 deletion install/index.md
@@ -1,5 +1,6 @@
import QSTabs from '../quick-start/qs-tabs'
import OldVersionTabs from './old-version-tabs'
import NightlyVersionTabs from './nightly-version-tabs'

# Install

Expand All @@ -11,8 +12,25 @@ Install Telepresence by running the commands below for your OS.

Follow one of our [quick start guides](../quick-start/) to start using Telepresence, either with our sample app or in your own environment.

## Installing nightly versions of Telepresence

We build and publish the contents of the default branch, [release/v2](https://github.com/telepresenceio/telepresence), of Telepresence
nightly, Monday through Friday.

The tags are formatted like so: `vX.Y.Z-nightly-$gitShortHash`.

`vX.Y.Z` is the most recent release of Telepresence with the patch version (Z) bumped one higher.
For example, if our last release was 2.3.4, nightly builds would start with v2.3.5, until a new
version of Telepresence is released.

`$gitShortHash` will be the short hash of the git commit of the build.

Use these URLs to download the most recent nightly build.

<NightlyVersionTabs/>

## Installing older versions of Telepresence

Use these URLs to download an older version for your OS, replacing `x.y.z` with the versions you want.
Use these URLs to download an older version for your OS (including older nightly builds), replacing `x.y.z` with the versions you want.

<OldVersionTabs/>
84 changes: 84 additions & 0 deletions install/nightly-version-tabs.js
@@ -0,0 +1,84 @@
import React from 'react';
import PropTypes from 'prop-types';
import { makeStyles } from '@material-ui/core/styles';
import AppBar from '@material-ui/core/AppBar';
import Tabs from '@material-ui/core/Tabs';
import Tab from '@material-ui/core/Tab';
import Box from '@material-ui/core/Box';
import CodeBlock from '@src/components/CodeBlock';
import LinuxIcon from '@src/assets/icons/linux.inline.svg';
import AppleIcon from '@src/assets/icons/apple.inline.svg';

function TabPanel(props) {
const { children, value, index, ...other } = props;

return (
<div
role="tabpanel"
hidden={value !== index}
id={`simple-tabpanel-${index}`}
aria-labelledby={`simple-tab-${index}`}
{...other}
>
{value === index && (
<Box p={3}>
{children}
</Box>
)}
</div>
);
}

TabPanel.propTypes = {
children: PropTypes.node,
index: PropTypes.any.isRequired,
value: PropTypes.any.isRequired,
};

function a11yProps(index) {
return {
id: `simple-tab-${index}`,
'aria-controls': `simple-tabpanel-${index}`,
};
}

const useStyles = makeStyles((theme) => ({
root: {
flexGrow: 1,
backgroundColor: 'transparent',
},
}));

export default function SimpleTabs() {
const classes = useStyles();
const [value, setValue] = React.useState(0);

const handleChange = (event, newValue) => {
setValue(newValue);
};

return (
<div className={classes.root}>
<AppBar elevation={0} style={{ background: 'transparent', color: 'black', borderBottom: '1px solid #e8e8e8', }} position="static">
<Tabs value={value} onChange={handleChange} aria-label="operating system tabs">
<Tab icon={<AppleIcon />} label="macOS" {...a11yProps(0)} style={{ minWidth: "10%", textTransform: 'none' }} />
<Tab icon={<LinuxIcon />} label="Linux" {...a11yProps(1)} style={{ minWidth: "10%", textTransform: 'none' }} />
</Tabs>
</AppBar>
<TabPanel value={value} index={0}>
<CodeBlock>
{
'https://app.getambassador.io/download/tel2/darwin/amd64/nightly/telepresence'
}
</CodeBlock>
</TabPanel>
<TabPanel value={value} index={1}>
<CodeBlock>
{
'https://app.getambassador.io/download/tel2/linux/amd64/nightly/telepresence'
}
</CodeBlock>
</TabPanel>
</div >
);
}
4 changes: 2 additions & 2 deletions install/old-version-tabs.js
Expand Up @@ -68,14 +68,14 @@ export default function SimpleTabs() {
<TabPanel value={value} index={0}>
<CodeBlock>
{
'https://app.getambassador.io/download/tel2/darwin/amd64/x.x.x/telepresence'
'https://app.getambassador.io/download/tel2/darwin/amd64/x.y.z/telepresence'
}
</CodeBlock>
</TabPanel>
<TabPanel value={value} index={1}>
<CodeBlock>
{
'https://app.getambassador.io/download/tel2/linux/amd64/x.x.x/telepresence'
'https://app.getambassador.io/download/tel2/linux/amd64/x.y.z/telepresence'
}
</CodeBlock>
</TabPanel>
Expand Down
2 changes: 2 additions & 0 deletions reference/routing.md
Expand Up @@ -28,6 +28,8 @@ The complete set of subnets that the [VIF](../tun-device) will be configured wit
#### Connection origin
A request to connect to an IP-address that belongs to one of the subnets of the [VIF](../tun-device) will cause a connection request to be made in the cluster. As with host name lookups, the request will originate from the traffic-manager unless the client has ongoing intercepts. If it does, one of the intercepted pods will be chosen, and the request will instead originate from that pod. This is a best-effort approach. Telepresence only knows that the request originated from the workstation. It cannot know that it is intended to originate from a specific pod when multiple intercepts are active.

A `--local-only` intercept will not have any effect on the connection origin because there is no pod from which the connection can originate. The intercept must be made on a workload that has been deployed in the cluster if there's a requirement for correct connection origin.

There are multiple reasons for doing this. One is that it is important that the request originates from the correct namespace. Example:

```bash
Expand Down

0 comments on commit cac1e2e

Please sign in to comment.